Found % character in a SQL query
- by Jensen
Hi,
I've an SQL database and I would like to do a query who show all the datas containing the sign "%". Normally, to find a character (for example: "z") in a database I use a query like this :
mysql_query("SELECT * FROM mytable WHERE tag LIKE '%z%'");
But here, I want to found the % character, but in SQL it's a joker so when I write:
mysql_query("SELECT * FROM mytable WHERE tag LIKE '%%%'");
It show me all my datas. So how to found the % character in my SQL datas ?
Thanks