php - Cant find whats wrong with the line -


i cant find whats wrong. happens after first session.

'select m1.id, m1.title, m1.timestamp, count(m2.id) reps, users.id userid, users.username pm m1, pm m2,users ((m1.user1="'.$_session['user'].'" , m1.user1read="no" , users.id=m1.user2) or (m1.user2="'.$_session['user'].'" , m1.user2read="no" users.id=m1.user1)) , m1.id2="1" , m2.id=m1.id group m1.id order m1.id desc'); 

you have ' in beginning of string, , m1.id2="1" missing begining parenthesis. additionally users.id coming from?

'select m1.id, m1.title, m1.timestamp, count(m2.id) reps, users.id    (     (m1.user1="'.$_session['user'].'" , m1.user1read="no" , users.id=m1.user2)      or      (m1.user2="'.$_session['user'].'" , m1.user2read="no" users.id=m1.user1) )  , m1.id2="1" , m2.id=m1.id group m1.id order m1.id desc'); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -