You are here:  » pb in search.php with HAVING (price)

Support Forum



pb in search.php with HAVING (price)

Submitted by raf on Wed, 2008-12-17 19:19 in

Hello i placed this code in search.php after

    if (isset($orderBySelection[$sort]))
    {
      $sql .= " ORDER BY ".$orderBySelection[$sort];
    }

//ajout
if (isset($_POST['envoiprix']))
    {
      $sql .= " HAVING (price) >= $envoiprix ";
    }
//ajout

it's ok But in click in next, the next don't follow.

Sorry for my english i french.

Submitted by support on Wed, 2008-12-17 19:54

Hello raf,

You are using a variable that has come from $_POST, so I think "envoiprix" is a field on a modified search form that you have made.

But when you click "Next", that variable is gone.

There are 2 things you need to do to fix this, but it is difficult to post the change in the forum. You need to support reading the variable from $_POST or $_GET; and then add the variable to every follow on link.

I can probably fix it easily for you if you send me these files:

search.php
html/searchform.php
html/navigation.php

You can email them to me (as attachments) to the address on this page...

Cheers,
David.

Submitted by raf on Wed, 2008-12-17 20:11

yes i thing the soluce is here but i don't find:

$offset = ($page-1) * $config_resultsPerPage;

$sql .= " LIMIT ".$offset.",".$config_resultsPerPage;

database_querySelect($sqlResultCount,$rows);

$resultCount = $rows[0]["resultcount"];

Submitted by raf on Wed, 2008-12-17 20:11

I use ajax in all file.

Submitted by raf on Wed, 2008-12-17 21:20

Please help me, just for fallow price in next page

Submitted by support on Wed, 2008-12-17 21:33

Hello raf,

I'm sorry, all posts are checked by me before they are shown.

I did not receive an email from you, can you send me these files:

search.php
html/searchform.php
html/navigation.php

To this address:

support@iaaisoftware.com

...and I will try to fix this for you..!

Cheers,
David.