01-16-2008, 02:20 AM
|
#2 (permalink)
|
|
La Vida es Sueño
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
|
You could always go for a UNION approach:
sql Code:
SELECT username, password FROM students WHERE student_id = '8563' AND password = MD5('password') UNION SELECT username, password FROM admin WHERE admin_id = '8563' AND password = MD5('password')
However, I would be keen to suggest that your table structure is... not wrong, but not well thought out. I think what would have been a better approach would to have put every single individual in one table, and then use bitwise operators to ascertain (to determine) their levels.
Welcome to TalkPHP by the way  I hope you decide to become a regular around here!
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
|
|
|