chriscloyd Posted December 14, 2006 Share Posted December 14, 2006 Can you get a mysql where u do it like this "WHERE level = 'sales', 'admin'heres my code[code]<?$sales = mysql_query("SELECT * FROM users WHERE level = 'sales', 'admin' ORDER BY first ASC");while ($s = mysql_fetch_assoc($sales)) { echo '<option value="'.$s['id'].'">'.$s['first'].' '.$s['last'].'</option>';}?>[/code] Link to comment https://forums.phpfreaks.com/topic/30606-solved-mysql_query/ Share on other sites More sharing options...
.josh Posted December 14, 2006 Share Posted December 14, 2006 select * from users where level in ('sales','admin') order by first asc Link to comment https://forums.phpfreaks.com/topic/30606-solved-mysql_query/#findComment-140921 Share on other sites More sharing options...
chriscloyd Posted December 14, 2006 Author Share Posted December 14, 2006 if i want to order by frist name then last name how would i do that? Link to comment https://forums.phpfreaks.com/topic/30606-solved-mysql_query/#findComment-140931 Share on other sites More sharing options...
artacus Posted December 14, 2006 Share Posted December 14, 2006 ORDER BY first, last Link to comment https://forums.phpfreaks.com/topic/30606-solved-mysql_query/#findComment-140935 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.