MySQL LIKE question

OllieT

New Member
I have a script:\[code\]$friendnotes = mysql_query("SELECT nid,user,subject,message FROM friendnote WHERE tousers LIKE '%$userinfo[username]%' ");\[/code\]And the content in the "tousers" table of the database:\[code\]Test Example User\[/code\]That script appears to be working wellHowever, if there is a user called "Test2", it would also display content that has "Test2" in the database where $userinfo[username] is just "Test"Is there any way to fix that problem? For example (this is just an example, I don't mind if you give another way) make it so that it searches whole lines?EDIT: I don't think anyone understands, the "tousers" table contains multiple values (seperated by line) not just one, I want it to search each LINE (or anything that works similiar), not row
 
Back
Top