Fibonacci Fibonacci - 2 months ago 8
MySQL Question

PhpMyAdmin search returns row but Sql returns null

when I search in the PhpMyAdmin an email of the style of

something@something.com


Using

LIKE %something@something.com%


It returns a row. But whenever I search it using an sql sentence, either from php or either executing the query from PhpMyAdmin

The query I'm using is

SELECT * FROM tblMyTable WHERE field LIKE '%something@something.com%'


Can it be because of the @?

Thanks

Answer

Got it to work with

SELECT * FROM  `tblTable` WHERE  `field` LIKE  '%something@something.com%'

For some reason without the ' in the table name and field name wasn't working