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.
Select special characters
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: Select special characters
Code: Select all
htmlentities("Products & Services");mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.