As for the Sphinx to query the flyback condition?

SELECT * FROM `real_index` WHERE product_key = "adsadaddsasd" LIMIT 2'

error syntax error, unexpected IDENT, expecting CONST_INT or CONST_FLOAT or '-' near
if you do product_key = 123123 all the rules that is absolutely in any request requires numbers, even if product_key is to put some another field. for example title = "adsadaddsasd" and so on
June 27th 19 at 15:22
2 answers
June 27th 19 at 15:24
Solution
problem solved, install a more recent version, and the queries execute correctly
June 27th 19 at 15:26
You have the product key numeric and the like match should be there
so I never pointed out that it's numeric - santina61 commented on June 27th 19 at 15:29
: what do you have him? - Eulalia22 commented on June 27th 19 at 15:32
here SQLSTATE[42000]: Syntax error or access violation: 1064 sphinxql: syntax error, unexpected $undefined, expecting QUOTED_STRING near '"@product_key asdasdas") LIMIT 2'
The SQL being executed was: SELECT * FROM `real_index` WHERE MATCH ("@product_key asdasdas") LIMIT 2' - santina61 commented on June 27th 19 at 15:35
:
rt_attr_string = product_key - santina61 commented on June 27th 19 at 15:38
: well, make a select * and see what's there - Eulalia22 commented on June 27th 19 at 15:41
: so it's empty until I before adding check if there is any product if no more to add, but when checking here is a mistake - santina61 commented on June 27th 19 at 15:44
: do not empty - Eulalia22 commented on June 27th 19 at 15:47
:

array(1) {
[0]=>
 array(6) {
["id"]=>
 string(1) "1"
["key"]=>
 string(0) ""
["product_key"]=>
 string(16) "asdasdsadadsdads"
["product_name"]=>
 string(12) "product_name"
["description"]=>
 string(0) ""
["company"]=>
 string(0) ""
}
}


'SQLSTATE[42000]: Syntax error or access violation: 1064 sphinxql: syntax error, unexpected $undefined, expecting QUOTED_STRING near '"@product_key asdasdsa") LIMIT 2'
The SQL being executed was: SELECT * FROM `real_index` WHERE MATCH ("@product_key asdasdsa") LIMIT 2' - santina61 commented on June 27th 19 at 15:50
: I do not understand where you took this array and where you select the asterisk - Eulalia22 commented on June 27th 19 at 15:53
: I Sphinx I just started today to work, in the sense of easily just select * ? without from and other parameters?

an array of sample select * from real_index - santina61 commented on June 27th 19 at 15:56
: well, the conclusion is you from show console and check the queries in the console - Eulalia22 commented on June 27th 19 at 15:59
well, the query I'm doing with the help of the library in php, and output record simply as an array did this entry product_key = "asdasdsadadsdads" , then make the query match, but swears - santina61 commented on June 27th 19 at 16:02
: do everything in the console and you will be happy - Eulalia22 commented on June 27th 19 at 16:05
: Well, this error will not disappear)

sphinxQL> select * FROM real_index
-> ;
+------+------+------------------+--------------+-------------+---------+
| id | key | product_key | product_name | description | company |
+------+------+------------------+--------------+-------------+---------+
| 1 | | asdasdsadadsdads | product_name | | |
+------+------+------------------+--------------+-------------+---------+
1 row in set (0.07 sec)

SELECT * FROM `real_index` WHERE MATCH ("@product_key asdasdsa") LIMIT 2

ERROR 1064 (42000): sphinxql: syntax error, unexpected $undefined, expecting QUOTED_STRING near '"@product_key asdasdsa") LIMIT 2' - santina61 commented on June 27th 19 at 16:08
: Well, check what kind of error this time
Take a ready example and enter your details
sphinxsearch.com/blog/2013/07/23/from-api-to-sphin... - Eulalia22 commented on June 27th 19 at 16:11
: here the queries are all OK, the error locally, the same query on the server works. - santina61 commented on June 27th 19 at 16:14
: problem solved, install a more recent version, and the queries execute correctly - santina61 commented on June 27th 19 at 16:17

Find more questions by tags Sphinx