mysql escaping single and double quotes
问题 I have a script that i am writing to move certain fields to a new db like $results = mysql_query ( "SELECT body, title FROM $source_db.Post" ); while ($row = mysql_fetch_array($results)) { if(mysql_num_rows($users_result) > 0){ $insert = "INSERT INTO wp_posts (`body`,`title`) VALUES ('{$row['body']}', '{$row['row']}')"; mysql_query($insert); } } but as you can see the query will break everytime due to the single and double quotes, is there a solution to this problem like herdok or something