Hi,
I have a problem with mysql joins, which are always a bit complicated
to me.
I use mysql version 4.0.25-standard.
This is my SQLstatement, used to check if user #1 has the right to
login:
SELECT users.*, rights.* FROM users
LEFT JOIN join_users_righ ts ON users.id=join_u sers_rights.use r
LEFT JOIN rights ON join_users_righ ts.right=rights .id
WHERE ((rights.name=' login') AND (users.id='1'))
And this is the error message I get:
#1064 - You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near
'right = rights . id WHERE ( ( rights . name = 'login' ) AND ( u
Where do I go wrong?
Thanks in advance,
Sjoerd Mulder
I have a problem with mysql joins, which are always a bit complicated
to me.
I use mysql version 4.0.25-standard.
This is my SQLstatement, used to check if user #1 has the right to
login:
SELECT users.*, rights.* FROM users
LEFT JOIN join_users_righ ts ON users.id=join_u sers_rights.use r
LEFT JOIN rights ON join_users_righ ts.right=rights .id
WHERE ((rights.name=' login') AND (users.id='1'))
And this is the error message I get:
#1064 - You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use
near
'right = rights . id WHERE ( ( rights . name = 'login' ) AND ( u
Where do I go wrong?
Thanks in advance,
Sjoerd Mulder
Comment