sql:select * from news where cat_id= and (sorting< or (sorting= and id>508)) 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>508)) 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>508)) 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: 6719052  Threads: 75  Questions: 403541081  Slow queries: 12829  Opens: 4419091  Flush tables: 1  Open tables: 512  Queries per second avg: 1338.503
                            [sqlstate] => 00000
                            [protocol_version] => 10
                            [thread_id] => 354456870
                            [warning_count] => 0
                        )
                )
            [type] => ->
            [args] => Array
                (
                    [0] => select * from news where cat_id= and (sorting< or (sorting= and id>508)) order by sorting desc,id limit 1
                )
        )
)