|
-
Aug 9th, 2005, 02:29 PM
#1
Thread Starter
Lively Member
[RESOLVED] SQL - skip first row
Hello all.
I'm using PHP & MySQL. The following works, but I would like to skip the first row.
Code:
$sql = mysql_query('SELECT time_id FROM posts WHERE thread_id=1');
Any help is appreciated.
Many thanks.
Last edited by solitario; Aug 9th, 2005 at 11:56 PM.
-
Aug 9th, 2005, 04:37 PM
#2
Member
Re: SQL - skip first row
You can use the limit clause:
 Originally Posted by mysql manual
To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last:
mysql> SELECT * FROM table LIMIT 95,18446744073709551615;
You could change yours to start at 1 instead of 95.
Link to that information
-
Aug 9th, 2005, 11:55 PM
#3
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|