eep, im trying to make my SQL statemtnes as efficient as possible, so as not to select all the rows from the database, when its relly not needed...
once again, im a coldfusion kiddy, and i learnt everything backwards... so im not too amazing with SQL statements...
what im trying to do, is select * from table, but only 20 rows, starting at row 51
example of my script:
<?php
$q = "SELECT * FROM gallery where catagory = '$cat' ORDER by id desc limit '$max' startrow = '$start'";
$gallery = mysql_query($q);
?>
but it no work 😛
any help out there?
(the vars work fine, and output their values.... so i suppose it could look like this:
<?php
$q = "SELECT * FROM gallery where catagory = 'user/random' ORDER by id desc limit '40' startrow = '80'";
$gallery = mysql_query($q);
?>
so... yeah...
any ideas on how to define startrow in the SQL statement, unstead of doing an i++ until the row i want it displayed?
;_;
lurv sonuku