MySQL LIMIT 4,6 returns 5 rows!

From: Date: Wed, 17 Oct 2001 00:24:04 +0000
Subject: MySQL LIMIT 4,6 returns 5 rows!
Groups: php.general 
Request: Send a blank email to php-general+get-71280@lists.php.net to get a copy of this message
strange one here, could someone explain why select * from subverts where status = 'L' order by date_added desc LIMIT 4,6 Reruns 5 rows? Below code returns : select * from subverts where status = 'L' order by date_added desc LIMIT 4,6 Bombs R Us Free Quarter Pounder at-Bristol / ass-Bristol Function: Pollution Clubman Code is: $sql = "select * ". "from subverts ". "where status = 'L' ". "order by date_added desc ". "LIMIT $first,$last"; echo " $sql "; $results1 = query_db( $sql, $db ); ?> <table width="95%" border=0 align=center cellpadding=3 cellspacing=0> <tr> <td> <? echo "<div align=centre>"; while( $subv = fetch_array_db( $results1 ) ) {
    echo $subv["title"]."<br>";
} echo "</td></tr></table>"; Still get five rows if I remove the desc. Ben **************************************************************
* Ben Edwards                                +352 091 429995 *
* Homepage                http://www.gifford.co.uk/~bedwards *
* i-Contact Progressive Video    http://www.videonetwork.org *
* Smashing the Corporate image     http://www.subvertise.org *
* Bristol's radical news            http://www.bristle.co.uk *
* PGP : F0CA 42B8 D56F 28AD 169B 49F3 3056 C6DB 8538 EEF8 * **************************************************************

« previous php.general (#71280) next »