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会将其视为字符串,而我不会生成任何结果