| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Pubcon Platinum Sponsor 2014|
|MYSQL: how do I select rows where a column contains a certain string?|
| 8:37 pm on Nov 7, 2004 (gmt 0)|
SELECT * FROM blog_posts WHERE keywords CONTAINS 'design' ORDER BY timestamp
but that gave a query error
| 8:40 pm on Nov 7, 2004 (gmt 0)|
You need somthing dealing with the mysql full text searching I believe.
| 8:43 pm on Nov 7, 2004 (gmt 0)|
oh well see I need to have it find rows where the keywords column *contains* "design" but may also contain other stuff
so say I have a row where keywords = "ewoinfd cweowm wo design fwpom dwopkjo weo"
I want the query to return that row
| 9:10 pm on Nov 7, 2004 (gmt 0)|
SELECT * FROM blog_posts WHERE keywords LIKE '%design%' ORDER BY timestamp
| 9:13 pm on Nov 7, 2004 (gmt 0)|
thanks jam that did it
| 6:42 am on Dec 12, 2004 (gmt 0)|
awesome jam :)
I had a similar prob to ocelot
I spent a whole night tryin to find the right answer and all that was missing from my script was a couple of percentage signs :: rolls eyes ::
| 1:06 pm on Dec 13, 2004 (gmt 0)|
We're glad you found us, villar. Welcome to WebmasterWorld.
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved