|
Posted by G0ng on 02/01/06 10:08
I have the following tables:
students
id, name,....
lessons
id,description,....
studentslessons
id,studentid,lessonid,grade
I want to list the lessons of student with name="John" for example.
The one way to do it is :
select id from students where name="John" and grab the id. then select *
from studentslessons where studentid=id;
the other is
select * from students,studentslessons where students.name="john" AND
students.id=studentslessons.studentid
Which is more efficient when using php4 and mysql 4.1? I'm using a
rather old computer Pentium 800MHz.
thanks
[Back to original message]
|