mysql statement not working -
i'm trying create secure session management each user gets hash , if user logs in somewhere else checks user has logged in hash. way if user forget's log out, system log out account them. sql statement wrote , it's giving me error. can tell me why?
thank you
"select * 'v_pos_user_session userid='$userid' , hash='$hash' , admin='0' time=(select max(time) v_pos_user_session userid='$userid' , admin='0')" qlstate[42000]: syntax error or access violation: 1064 have error in sql syntax; check manual corresponds mysql server version right syntax use near 'time=(select max(time) v_pos_user_session userid='6' , admin='0')' @ line 1
you have escape time backticks , forgot and
select * v_pos_user_session userid='$userid' , hash='$hash' , admin='0' , `time`=(select max(time) v_pos_user_session userid='$userid' , admin='0') and left unnecessary ' before v_pos_user_session
Comments
Post a Comment