Jump to content

[SOLVED] Query Error


nathanblogs

Recommended Posts

Hey I am having trouble matching a field that contains \'.

 

For example say the companies table there was a value of "exam\'ple" as the company_name.

 

If I use the following:

 

$data[0] = "exam\'ple";
$qry = 'SELECT * FROM companies WHERE company_name LIKE "' . $data[0] .'"';
then run the query

 

it will return an empty set result, even though they are exactly the same.

 

I have tried using '' instead of "" but occur the same problem.

Link to comment
https://forums.phpfreaks.com/topic/76471-solved-query-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.