redarrow Posted December 11, 2008 Share Posted December 11, 2008 advance thank you. <?php $result = mysql_query("SELECT * FROM users where id='id' AND ORDER BY id "); ?> Link to comment https://forums.phpfreaks.com/topic/136481-does-my-database-query-look-correct-please-cheers/ Share on other sites More sharing options...
trq Posted December 11, 2008 Share Posted December 11, 2008 We wouldn't have a clue. Do you have a field called id that holds a value of id[/]? Link to comment https://forums.phpfreaks.com/topic/136481-does-my-database-query-look-correct-please-cheers/#findComment-712383 Share on other sites More sharing options...
redarrow Posted December 11, 2008 Author Share Posted December 11, 2008 Just want to no how to use the order by with a id='$id' please and thank you. database users. id name $res="select * from users where id='$id' order by id"; $res_result=mysql_query($res)or die(mysql_error()); Does it look correct trying to learn the order by and id='$id' Also this trying to learn. $res="select id , name, from users where id='$id' FIRST(order by id) group by name"; $res_result=mysql_query($res)or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/136481-does-my-database-query-look-correct-please-cheers/#findComment-712385 Share on other sites More sharing options...
blueman378 Posted December 11, 2008 Share Posted December 11, 2008 take out the AND Link to comment https://forums.phpfreaks.com/topic/136481-does-my-database-query-look-correct-please-cheers/#findComment-712405 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.