Simple MySQL select question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HuntHerr
Forum Newbie
Posts: 10
Joined: Mon Jun 30, 2003 10:17 pm

Simple MySQL select question

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
HuntHerr
Forum Newbie
Posts: 10
Joined: Mon Jun 30, 2003 10:17 pm

Post by HuntHerr »

sorry it was confusing and an easy question, but it worked, thanks a ton
Post Reply