Select special characters
Posted: Wed Jul 28, 2010 11:45 am
Hi All
I am selecting data from mysql database; below is the scenario;
I have a column with data like 'Products & Services'. I get a value on my page, i.e page title, which is 'Products & Services'.
I then pass this value to my query as 'select * from tbl where fieldname='Products & Services''. Since the actual data stored in the table is 'Products & Services', I do not get any results.
Please any help on this will be appreciated. I am using php to execute the query.
Thanks in advance.
I am selecting data from mysql database; below is the scenario;
I have a column with data like 'Products & Services'. I get a value on my page, i.e page title, which is 'Products & Services'.
I then pass this value to my query as 'select * from tbl where fieldname='Products & Services''. Since the actual data stored in the table is 'Products & Services', I do not get any results.
Please any help on this will be appreciated. I am using php to execute the query.
Thanks in advance.