gibigbig Posted April 25, 2010 Share Posted April 25, 2010 I would like to get every result from a table except the very last record. example if a database has this structure: ID 0 1 2 3 4 5 i only want the records from 0-4. I want it to select all but the last record, this means that i cant know how many records there are since the records will keep increasing Link to comment https://forums.phpfreaks.com/topic/199638-grab-all-but-last-result/ Share on other sites More sharing options...
Pikachu2000 Posted April 25, 2010 Share Posted April 25, 2010 Run a SELECT COUNT() query, then use the result in the LIMIT clause for the SELECT query. Link to comment https://forums.phpfreaks.com/topic/199638-grab-all-but-last-result/#findComment-1047837 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.