0
我似乎無法找到記錄的位置,以便成功準備使用POINT數據類型的語句。如何在使用INSERT時使用mysqli編寫帶有POINT的SQL語句
上一個問題(How to use POINT mysql type with mysqli - php)顯示標記爲正確的東西,但不起作用。我甚至用他們簡單的查詢在他們的榜樣嘗試:
$stmt = $this->conn->prepare("INSERT INTO days(day,POINT(lat,lon)) VALUES(?,?,?)");
$stmt->bind_param("sdd", $day, $lat, $lon);
這只是簡單的返回和錯誤:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(lat,lon)) VALUES(?,?,?)' at line 1
'INSERT INTO days(day,point)VALUES(?,POINT(?,?))'!? – JustOnUnderMillions