Sql statement return with zero result [closed]
- by foodil
I am trying to choose the row where
1)list.ispublic = 1
2)userlist.userid='aaa' AND userlist.listid=list.listid
I need 1)+2)
There is a row already but this statement can not get that row, is there any problem?
List table:
ListID ListName Creator IsRemindSub IsRemindUnSub IsPublic CreateDate LastModified Reminder
1 test2 aaa 0 0 1 2012-03-09 NULL NULL
user_list table (No row):
UserID ListID UserRights
My test version
SELECT l.*, ul.*
FROM list l
INNER JOIN user_list ul ON ul.ListID = l.ListID
WHERE l.IsPublic = 1
AND ul.UserID = 'aaa'
There is zero result. How can I fix that?