Jump to content

[SOLVED] query to check to see if string exist


acctman

Recommended Posts

SELECT Users FROM Members WHERE Users LIKE '%Mike%'

 

If you get rows, string exists, if no...then it diesn't

 

 

This one will even tell you Yes or No :P

SELECT IF(COUNT(*) > 0,"Yes","No") AS stringExists FROM Members WHERE Users LIKE "%Mike%" LIMIT 1;

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.