Jump to content

Archived

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

ego0

Select * LIKE 'something'

Recommended Posts

I have a book about SQL 'SQL for Dummies' to be specific and I have found the keywords 'LIKE' and 'NOT LIKE' and I was wondering if this can be used in MYSQL syntax? (Need to know for usage in PHP script)

Share this post


Link to post
Share on other sites
Sure... SELECT * FROM yourTable WHERE yourField LIKE 'j%' will retrieve anything that starts with a 'j'. Note that if you start with a wildcard, you won't be able to use an index.

Share this post


Link to post
Share on other sites

×

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.