I am trying to make a member roster for a game and was wanting to order the members by class. Would it be better to use the where statement to tell the query to only find that class, or to use an if statement.
I tried both but can't get either to work. I am still pretty new to the whole php/mysql scene so show some detail if you could please =) Thx.
Not quite follqowing you here, but I think what you are saying is you want all your members grouped by class ? If so, something like select * from member order by class should work.
amc
Yea, I want all the members grouped by class. But I would like to have each class in its own table to make the page a little nicer looking. I was thinking i could do 'select * from dbname where class="enter_classname_here' but I couldnt get it to work right.
oops.
Anyway, here is the regular mysql statement i want to use:
SELECT * FROM profiles WHERE class = "monk"
It works fine in mysql but i cant seem to get it to work with php. Is there a certain way to do this?