Hi all, I know this might shock some but I just cant figure out what's wrong with this SQL statement.. it kills my head.
SELECT * FROM groups WHERE gname LIKE '%m%';
I am using mysql 5.1.41
Hi all, I know this might shock some but I just cant figure out what's wrong with this SQL statement.. it kills my head.
SELECT * FROM groups WHERE gname LIKE '%m%';
I am using mysql 5.1.41
This statement will retrieve every column and every row from the groups table where the gname column contains a lowercase m somewhere. Is this what you wanted to achieve?
If you don't get any rows back, perhaps that's the right answer. Mistakes usually happen when your assumptions don't match the situation at hand.
Are you sure you have values in the gname column with lower case 'm' in them?
Are you sure you're running the query against the database you think you are?