[PHP] sql query question

2004-02-12 Thread tony
hi if i have new car and i want to search each word in description can i do SELECT * FROM table WHERE descript = new OR descript =car?? any help is appreciated -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] SQL Query Question

2001-12-08 Thread Andrew Brampton
Hi, This isn't a php question, more of a SQL question, but I don't know any where better to send it, and I guess its trival enough for someone here to answer. Anyway, I have a list of members each with a score field. How can I say that Member 3 is ranked 10 out of 100 members for example.

Re: [PHP] SQL Query Question

2001-12-08 Thread Jason G.
Assuming you have the variable member_id (for the member in question)... Get the score for that member and store it to $score... SELECT score FROM members WHERE id=$member_id Then to determine rank, just do this... SELECT COUNT(*)+1 as rank FROM members WHERE SCORE$score; -Jason Garber