Page 1 of 1

Simple MySQL select question

Posted: Fri Jun 03, 2005 11:28 am
by HuntHerr
I have a table titled users and within the table there is a field titled division (either 1,2,3,4) - on a page that displays all members, i would like to group them by division - but leave spacing between divisions. I know I could use this:

Code: Select all

SELECT * FROM users ORDER BY division
- but i would like to know how to select by the field? sorry if its confusing, new to php and still learning it. thanks

Posted: Fri Jun 03, 2005 11:32 am
by John Cartwright
To be honest I'm not quite sure what you just said :?

Perhaps you want

Code: Select all

SELECT * FROM `users` WHERE `division` = '3'
? Please explan.

Posted: Fri Jun 03, 2005 12:15 pm
by HuntHerr
sorry it was confusing and an easy question, but it worked, thanks a ton