php - Mysql select where contains -


i have social networking site in process of constructing. users can follow each other , adds name list of followers. need scan list session username cookie choose statuses (posts) display. in sql recordset, have code:

select * statuses followedby contains '". $_session['mm_username']."'  

but brings error

you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'contains 'usernamecookie'' @ line 1

try this:

select * statuses followedby '%". $_session['mm_username']."%'  

like clause used string matching.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -