如何在mysqli-php中使用pointmysql类型

如何在mysqli-php中使用pointmysql类型,php,mysql,mysqli,Php,Mysql,Mysqli,基于PHP.net中的: Type specification chars Character Description i corresponding variable has type integer d corresponding variable has type double s corresponding variable has type string b corresponding variable is a blob and will be sent in p

基于PHP.net中的:

Type specification chars Character Description i corresponding variable has type integer d corresponding variable has type double s corresponding variable has type string b corresponding variable is a blob and will be sent in packets 但问题是因为我的数据库使用类型
POINT
中的惊人定位字段,所以


如何在mysql中使用POINT数据类型创建bind_param?

您应该使用mysql函数POINT,以便从纬度/经度进行转换

$stmt = $this->conn->prepare("INSERT INTO days(day,POINT(lat,lon)) VALUES(?,?,?)");
        $stmt->bind_param("sdd", $day, $lat, $lon);

在php.net上,我在哪里可以找到所说的表?插入到天数(day,startLocation)值(?,POINT(?)?不,我在非对象上得到了对成员函数bind_param()的错误调用-在插入等的那一行上。
非对象上的bind_param()表示
准备()
调用已失败,因此SQL语句本身而不是变量类型出现问题。请检查
echo$this->conn->error;
以了解尝试调用
prepare()
后的原因。
$stmt = $this->conn->prepare("INSERT INTO days(day,POINT(lat,lon)) VALUES(?,?,?)");
        $stmt->bind_param("sdd", $day, $lat, $lon);