crEA-tEch
03-07-2004, 11:42 AM
Hey guys...
I have entries in my mySQL database that are slashed, e.g: Nick\\'s Cars
But the problem is when I come to call it from the database without a slash like this: Nick\'s Cars
I addslashes before the query is carried out:
$company_name=addslashes($company_name);
$query="SELECT * FROM tod_company_information WHERE company_name='$company_name' ORDER BY $sort ASC";
$result=mysql_query($query);
But it still doesn't return anything.... I've tried it with a field that doesn't have to be slashed... it works fine..
Any ideas?
Thanks in advance
crE
I have entries in my mySQL database that are slashed, e.g: Nick\\'s Cars
But the problem is when I come to call it from the database without a slash like this: Nick\'s Cars
I addslashes before the query is carried out:
$company_name=addslashes($company_name);
$query="SELECT * FROM tod_company_information WHERE company_name='$company_name' ORDER BY $sort ASC";
$result=mysql_query($query);
But it still doesn't return anything.... I've tried it with a field that doesn't have to be slashed... it works fine..
Any ideas?
Thanks in advance
crE
