Jump to content

*SOLVED* multiple LIKE SQL statements


shocker-z

Recommended Posts

*SOLVED*
I was searching on a test word with caps in it :| always the last thing you try heh! :smiley:




Hi there i'm doin a litle search engine thingy majigerdy..

The SQL code my script generates is: SELECT * FROM threads WHERE topic = 'Windows XP Service Pack 2' AND thread LIKE '%xp%' AND thread LIKE '%bsod%'

What is up with it, as it works fine with just: SELECT * FROM threads WHERE topic = 'Windows XP Service Pack 2' AND thread LIKE '%xp%'

The first statement returns no records even altho i know both words are contained inside the field thread.

Anyone?

Regards
Liam
Link to comment
https://forums.phpfreaks.com/topic/11316-solved-multiple-like-sql-statements/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.