From:             elguardian2409 at hotmail dot com
Operating system: Windows XP
PHP version:      Irrelevant
PHP Bug Type:     MySQL related
Bug description:  Need help please

Description:
------------
Hello, I'm trying to create a simple code for my website. My website is
about
real estate agency. And I did a programm called search.php that mades
search on
mysql database where I save the property information. Everything is going
all
right but I would like in the function display results change something.
In
fact, I'd like when the search.php find properties that show them 4
properties
per page. How can I do the code? I know it's simple but I can't...

Starting this is display result code:
function displayResults($retVal, $timer) {
        global $config;
        $size = count($retVal);

        $header = $config["installbase"] . "/" . $config["header"];
        include($header);

        printf("\t<CENTER><H2>%s</H2></CENTER>\n", $config["displayHeader"]);

        if ($config["timed"]) { //Time taken to locate all files.
                printf("\tFound <B>%d</B> properties in %d sec.<P>\n", $size, 
time() -
$timer);
        } else {
                printf("\tFound <B>%d</B> properties.\n\t<P>\n", $size);
        }

        $i = 0;
        while($i <= $size - 1){
                $locationp = $retVal[$i]["location"];
                $typep = $retVal[$i]["type"];
                $pricep = $retVal[$i]["pricez"];
               $price = $retVal[$i]["price"];
                $details = $retVal[$i]["details"];
                $ref = $retVal[$i]["ref"];
                $pic = $retVal[$i]["pic"];
                $link1 = $retVal[$i]["link1"];
                $link2 = $retVal[$i]["link2"];

Please I need help, anyone know hot to make that appears 4 properties per
page,
and automaticly appears page 1, page 2, page 3, page 4, page 5 depend of
the
property numbers.

The href would be something like that:
search.php?location=*&ptype=*&pricez=*&page=nš

Please i hope someone can understand what i mean. I will very pleased if
someone
can help me. Thanks



-- 
Edit bug report at http://bugs.php.net/?id=30773&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30773&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30773&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30773&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30773&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30773&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30773&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30773&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30773&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30773&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30773&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=30773&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=30773&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30773&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30773&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30773&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30773&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30773&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30773&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30773&r=mysqlcfg

Reply via email to