Hi all

I'm rather perplexed as to how I'm supposed to select rows from a database without having to use 9999 in my limit and I can't seem to find anything on how you specify fetching anything from a certain row onwards.

Using this at the moment

LIMIT 10, 9999

I was hoping to use something like this but it doesn't work

LIMIT 10, *

Try this:

LIMIT 10, row_count.

Hi,

Have ago at this...

PHP though,
Havent done much in mySQL!

<?php
$sqlnum = "SELECT * FROM tablename";
$querynum = mysql_query($sqlnum);

$rowcount = mysql_num_rows($querynum);

$sql = "SELECT * FROM tablename LIMIT 10, ".$rowcount;
?>

Thanks,
Marais

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.