當我試圖插入下面的代碼片段的行時,它會拋出嚴格的標準警告$ user_info_do-> get_first_name()其中user_info_do是成員變量first_name的類。PHP-bind_param引發INSERT準備語句的警告
ERROR: Strict standards: Only variables should be passed by reference
$query = "INSERT INTO user_info (first_name) VALUES (?);";
if(!($query_stmt = $this->m_db_connection->prepare($query))) {
return;
}
if(!$query_stmt->bind_param("s", $user_info_do->get_first_name()) {
return;
}
請幫我可能是什麼原因就在這裏。
的可能重複的[mysqli的:嚴格的標準:只有變量應該通過引用傳遞(http://stackoverflow.com/questions/23843383/mysqli-strict-standards-only-variables-should-被引用通過) – raina77ow 2014-12-13 13:08:56