Lamez Posted August 24, 2008 Share Posted August 24, 2008 ok so I am pulling all the information from the foot ball bowl database and I have selected 10 bowls, but with my query I have it comes out like this 1 10 2 3 5 ... 9 Why? here is my query <?php $q = mysql_query("SELECT * FROM `foot_bowls` ORDER BY `id` ASC"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/121138-solved-ordering-from-database/ Share on other sites More sharing options...
DeanWhitehouse Posted August 24, 2008 Share Posted August 24, 2008 Are you echoing the id? Quote Link to comment https://forums.phpfreaks.com/topic/121138-solved-ordering-from-database/#findComment-624495 Share on other sites More sharing options...
Lamez Posted August 24, 2008 Author Share Posted August 24, 2008 yes, this is how I know it is doing this Quote Link to comment https://forums.phpfreaks.com/topic/121138-solved-ordering-from-database/#findComment-624496 Share on other sites More sharing options...
redarrow Posted August 24, 2008 Share Posted August 24, 2008 <?php $num=10; $q = mysql_query("SELECT * FROM `foot_bowls` where `foot_bowls`='$num'"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/121138-solved-ordering-from-database/#findComment-624497 Share on other sites More sharing options...
PFMaBiSmAd Posted August 24, 2008 Share Posted August 24, 2008 You column type is character not numeric. If your column will only be holding numbers, change it to an INT type. Quote Link to comment https://forums.phpfreaks.com/topic/121138-solved-ordering-from-database/#findComment-624498 Share on other sites More sharing options...
Lamez Posted August 24, 2008 Author Share Posted August 24, 2008 oh ok, I will see if that helps! Quote Link to comment https://forums.phpfreaks.com/topic/121138-solved-ordering-from-database/#findComment-624499 Share on other sites More sharing options...
Lamez Posted August 24, 2008 Author Share Posted August 24, 2008 wow simple as that! Thanks Quote Link to comment https://forums.phpfreaks.com/topic/121138-solved-ordering-from-database/#findComment-624501 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.