0

I was wondering if there was a contains word to use with a mysql query, my current query is :

//$query="SELECT * FROM $table WHERE date = '$selecteddate' AND Style = '$selectedstyle' AND Platform = '$selectedplatform'";

but the $selectedplatform isn't always the only thing in the Platform column, I just want to search the database to see if that column contains the value of $selectedplatform for the row in question.

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by shekar.bdn
0

Take a look at the LIKE search.
The following should select all records that have the word `John' in the `name' column.

SELECT * FROM client_names WHERE name LIKE '%John%';
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.