this is my first question on stackoverflow, I hope someone can help me.
I am making a website similar to facebook. heres my sql.
readsql = "SELECT * FROM post INNER JOIN ubuser ON (post.pos_USERID = ubuser.usr_ID) WHERE ubuser.usr_ID == '"session("ID")"'"
and heres the error im getting
Microsoft VBScript compilation error '800a0401'
Expected end of statement
/student/S0215538/newsfeed1.asp, line 22
readsql = "SELECT * FROM post INNER JOIN ubuser ON (post.pos_USERID = ubuser.usr_ID) WHERE ubuser.usr_ID == ' "session("ID")" ' "
--------------------------------------------------------------------------------------------------------------^
I cant see why I am getting this error, if i comment out the WHERE onwards, it works, but its not what I need.
thanks in advance
Thanks everyone, that was fast.
I always forget the &, and the people who mentioned the == should be =, you were also right.
it fixed that error, however i now have a new error saying "Data type mismatch in criteria expression" in this line post.Open readsql, connection, adOpenkeyset, AdLockOptimistic
"post" is my recordset and "connection" is the adodb connection.