skyer2000 Posted August 4, 2008 Share Posted August 4, 2008 Quick Question, After pulling results from a query, how do you skip the first result? Link to comment https://forums.phpfreaks.com/topic/118026-solved-skip-first-result-from-query/ Share on other sites More sharing options...
cooldude832 Posted August 4, 2008 Share Posted August 4, 2008 in php you can do http://us2.php.net/manual/en/function.mysql-field-seek.php otherwise you could try and do a LIMIT on a query that chops of row #1 Link to comment https://forums.phpfreaks.com/topic/118026-solved-skip-first-result-from-query/#findComment-607191 Share on other sites More sharing options...
skyer2000 Posted August 4, 2008 Author Share Posted August 4, 2008 I am using PHP, but still can't figure it out. What do you mean by using Limit to chop of row #1? The results will be changing as I add newer ones, so I can't specifically skip a certain 'id'. Link to comment https://forums.phpfreaks.com/topic/118026-solved-skip-first-result-from-query/#findComment-607549 Share on other sites More sharing options...
The Little Guy Posted August 4, 2008 Share Posted August 4, 2008 $sql = mysqls_query("SELECT * FROM `tableName`"); $i = 0; while($row = mysql_fetch_array($sql)){ if($i != 0){ echo $row['columnName'].'<br />'; } $i++; } Link to comment https://forums.phpfreaks.com/topic/118026-solved-skip-first-result-from-query/#findComment-607603 Share on other sites More sharing options...
skyer2000 Posted August 4, 2008 Author Share Posted August 4, 2008 Of course, I never thought to do that, thank you! Link to comment https://forums.phpfreaks.com/topic/118026-solved-skip-first-result-from-query/#findComment-607713 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.