2009年3月23日星期一

[fw-db] About Quote Escape and StripSlashes

Hi,

I cannot find any information about how to stripslashes / unquote a quoted
string by Zend.

So assuming we store the data into mySQL:

$string = $db->quote("people's");

$data = array("data" => $string);

$db->insert('database', $data);


When i try to retrieve the records using:

$query = $db->select()
->from('database')
->limit(1);

$results = $db->fetchRow($query);

$returnString = $results['data'];


I will get the following string instead:

people\'s

Can anybody enlighten me on how can i unquote a database string in this
scenario? Is there any Zend method to do the job? Or do i have to use
stripslashes?

Thank you so much!


--
View this message in context: http://www.nabble.com/About-Quote-Escape-and-StripSlashes-tp22662721p22662721.html
Sent from the Zend DB mailing list archive at Nabble.com.

没有评论: