problem combining multi and single record

7 posts by 2 authors in: Forums > CMS Builder
Last Post: March 13, 2011   (RSS)

By yusuke - March 8, 2011

I made a file combining a multi and a single record. There is something very strange happening. An URL's record number and actual displaying record number does not match.

1) Please take a look at the below page and click on one of the Users' link except for User: cmsf4.

http://keep-stock-p.com/verjp/index.php

2) Click on "COMMENT".

The filename shows, for example, shopDetail.php?5 and it should display num: 5, instead, it displays num: 3.

Please help!
Attachments:

comment.php 6K

Re: [yusuke] problem combining multi and single record

By Jason - March 8, 2011

Hi,

I took a look and I wasn't able to recreate the issue.

For example:

http://keep-stock-p.com/verjp/shopDetail.php?5

displays a num of 5, which is what we would expect.

Can you give me some more information about this issue?

Thanks
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] problem combining multi and single record

By yusuke - March 8, 2011

Hi Jason,

Sure, it first displays the correct num when opening the link.
The problem occurs "after" clicking the "COMMENT" link.

Will you please try it again?

FYI: clicking "COMMENT" link again will fix the issue.

Re: [yusuke] problem combining multi and single record

By Jason - March 9, 2011

Hi,

I think the problem is you where using getNumberFromEndOfUrl(). This would get the 5 and put it in your where clause. Try replacing it with whereRecordNumberInUrl() like this:


list($accountsRecords, $accountsMetaData) = getRecords(array(
'tableName' => 'accounts',
'where' => whereRecordNumberInUrl(),
'limit' => '1',
'allowSearch' => '0',
));
$accountsRecord = @$accountsRecords[0]; // get first record


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] problem combining multi and single record

By yusuke - March 10, 2011 - edited: March 10, 2011

Hi Jason,

Thank you so much the answer.
It fixed the existing problem however created another problem.

Please take a look and follow the steps to view the problem.

1) Open the below URL
http://keep-stock-p.com/verjp/comment.php?3

2) Click on the "Next >>" button

3) It should keep the same ACCOUNT-Detail since the COMMENT-List applies to the ACCOUNT-Detail of the previous page BUT it doesn't.

Please Help.

Re: [Jason] problem combining multi and single record

By yusuke - March 13, 2011

Hi Jason,

Thank You![;)]
It's working beautifully.

Yusuke