bahytq
05-04-2003, 08:13 AM
I am doing a small project in mySQL and PHP , i don't know how to query something like this :
I have a table call member always contains 3 chars which has this format : the first char for the class ( eg. A,B,C,D...) and the 2 left chars stand for the order of that student in the class ( eg. in Alphabet order ....) . I want to have the list of all student in the class A ,no matter what the order of that student is . then how do i code ? i did something like this
SELECT * FROM member WHERE memberid ="A??" because i think it will return only the records in the table member which contains the memberid that has only the first char is "A" .
but it returns no records although it told me that "Your SQL-query has been executed successfully " .
It was really so hard to solve it myself , anyone has won this please help me .
I have a table call member always contains 3 chars which has this format : the first char for the class ( eg. A,B,C,D...) and the 2 left chars stand for the order of that student in the class ( eg. in Alphabet order ....) . I want to have the list of all student in the class A ,no matter what the order of that student is . then how do i code ? i did something like this
SELECT * FROM member WHERE memberid ="A??" because i think it will return only the records in the table member which contains the memberid that has only the first char is "A" .
but it returns no records although it told me that "Your SQL-query has been executed successfully " .
It was really so hard to solve it myself , anyone has won this please help me .