Re: Sorting MYSQL results Paging and column heads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Edward Brookhouse wrote:
Hi All,

I am working on a PHP page to display results from a MySQL db and I am having a problem getting my results to page properly.

When the page loads, it looks fine, but hitting next/previous does not change the data?

<snip>

db_connect_ecelerity(DBUSER, DBUSERPW);
$query1 = "select * FROM `bouncelog` ORDER BY `insert_date` DESC LIMIT $offset, $rowsPerPage";

Is it running this query or the next one?

            if(!$rs = mysql_query("SELECT * FROM bouncelog ORDER BY $col $dir LIMIT 500")) {
                echo "Cannot parse query";

There's only a limit here, no offset attached.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux