$pdo = $db->getConnection();
$query="""select column_name as "3-D" from table where colume_code='Goa'"""
$stmt = $pdo->prepare($query);
if(!$stmt->execute()){
http_response_code(500);
echo "Error executing query";
exit;
}
在 php 中執行查詢時,我在執行查詢時出錯,需要回傳帶有值的 3-D
uj5u.com熱心網友回復:
試試這個:
$query="select column_name as \"3-D\" from table where colume_code='Goa'";
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/380399.html
標籤:php sql 数据库 PostgreSQL的
