如何正確地編寫一個MySQL查詢的代碼,這兩個implodes和mysql_real_escape_string?PHP的問題結合implode()和mysql_real_escape_string()
這是我的代碼,但它的失敗:
$sql = "INSERT INTO BEER_LOCATIONS
(LOCATION_NAME, LOCATION_STREET, LOCATION_CITY, LOCATION_STATE,
LOCATION_ZIPCODE, LOCATION_PHONE, BEER_STYLE)
VALUES
('" . mysql_real_escape_string(implode("', '", $row)) . "')";
感謝