Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php sphinxql的select查询返回字符串中的所有内容,而不考虑表中的数据类型_Php_Full Text Search - Fatal编程技术网

Php sphinxql的select查询返回字符串中的所有内容,而不考虑表中的数据类型

Php sphinxql的select查询返回字符串中的所有内容,而不考虑表中的数据类型,php,full-text-search,Php,Full Text Search,我将配置文件作为属性写入-: sql_attr_float = rad_latitude sql_attr_float = rad_longitude 但在select查询中,我得到的数据为 array(2) { ["rad_latitude"]=> string(9) "-0.371600" //this needs to be float ["rad_longitude"]=> string(9) "-0.878434" //this needs to be

我将配置文件作为属性写入-:

sql_attr_float  = rad_latitude
sql_attr_float  = rad_longitude  
但在select查询中,我得到的数据为

 array(2) {
 ["rad_latitude"]=>
 string(9) "-0.371600" //this needs to be float
 ["rad_longitude"]=>
 string(9) "-0.878434"  //this needs to be float
 }

它是以字符串的形式出现的,我不能计算出测地仪,因为它是以字符串的形式出现的

sphinxql的execute函数以字符串形式返回数据,但您可以按原样在geodist查询中使用它。请记住不要在查询中的列名上使用引号,如果在其上加引号,sphinx会将其视为字符串,而我不会生成任何结果