Reputation: 16823
I am trying to do something like this:
$url = 'test/';
$url = rtrim($url, "'");
$url = $db->quote($url);
$sql = "SELECT * FROM mytable WHERE url = '{$url}' OR url = '{$url}/'";
But this return: SELECT * FROM mytable WHERE url = ''test/'' OR url = ''test/'/'
I basically want the equivalent of mysql_real_escape_string for Zend.`
Upvotes: 0
Views: 166
Reputation: 28773
Try with like
like
$sql = "SELECT * FROM mytable WHERE url LIKE '%{$url}/%'";
Or even you can try like
$url = 'test/';
$sql = "SELECT * FROM mytable WHERE url LIKE '%{$url}%'";
Upvotes: 1