Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6070 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a DB with 27,000 real estate listings. Created with Site assistant and modified a little.

Doing a search provides a number of records in list view.

Clicking next will go to the next set of 10.

Clicking link will provide the detail page.

Clicking back in the browser shows all listings not the second set of 10 as it should.

Clicking Back botton again provides the second set of 10 as it should

If you are viewing the first set of 10 records this is not an issue. It is only after going to the next set of 10 records

Any suggestions?

Also: Periodically the price of the house will show up as zero and some times it will show up correct?:)? Periodically, not all the time. Normally after I have concurred some other issue!

Here is the formating for that field. It is the same on the detail page and works all the time?:

<?php echo nl2br ($english_format_number = number_format($record->getField('List Price', 0),0));?>

Thanks

Site link:

Link to the Site www.MLSMAX.com

  • Newbies
Posted

Hi there,

I tried the site assistant not too long ago to see how it actually handled the pagination code and found through my testing that it did not always produce accurate results when clicking next, first, last or previous to change the records being shown that you configure through the $max and $range variables.

You'll notice that in fmview.php they have their code that builds the pagination.And in your recordlist.php file you have code resembling:

[color:blue]

// get the skip and max values

$skip = $cgi->get('-skip');

if (isset($skip) === false) {

$skip = 0;

}

$max = $cgi->get('-max');

if (isset($max) === false) {

$max = 25;

}

I found that the weird errors occurred because their code for handling the $max and $range variables was storing them as $_SESSION variables. So leaving a page then returning to it would grab weird values and produce unexpected results. So I ended up rewriting the entire pagination code to not handle the variables as $_SESSION variables and passed them as $_GET variables. Then in my recordlist.php i changed it to check if the $_GET variables for min and max were set. If so, pass them to the pagination function and use them. If not, set the max and range to their default values. Thus making:

[color:blue]// get the skip and max values

$skip=$_GET['skip'];

if (isset($skip) === false) {

$skip = 0;

}

$max=$_GET['max'];

if (isset($max) === false) {

$max = 25;

}

Hope that might get you in the right direction.

This topic is 6070 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.