sql:select * from news where cat_id= and (sorting< or (sorting= and id>592)) order by sorting desc,id limit 1
错误: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 'and (sorting< or (sorting= and id>592)) order by sorting desc,id limit 1' at line 1Array
(
[1] => Array
(
[file] => /lnweb01/domain/2/2/8/22818/www/detail.php
[line] => 100
[function] => execute_dql
[class] => SqlHelper
[object] => SqlHelper Object
(
[conn] => mysqli Object
(
[affected_rows] => -1
[client_info] => 5.5.20
[client_version] => 50520
[connect_errno] => 0
[connect_error] =>
[errno] => 1064
[error] => 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 'and (sorting< or (sorting= and id>592)) order by sorting desc,id limit 1' at line 1
[field_count] => 2
[host_info] => lndb01.east.net via TCP/IP
[info] =>
[insert_id] => 0
[server_info] => 5.6.32
[server_version] => 50632
[stat] => Uptime: 81857692 Threads: 77 Questions: 1915437537 Slow queries: 309886 Opens: 89641877 Flush tables: 1 Open tables: 512 Queries per second avg: 285.743
[sqlstate] => 00000
[protocol_version] => 10
[thread_id] => 376777913
[warning_count] => 0
)
)
[type] => ->
[args] => Array
(
[0] => select * from news where cat_id= and (sorting< or (sorting= and id>592)) order by sorting desc,id limit 1
)
)
)