I would like to ask where are the minor issues in writing PHP database operations? As long as I have given the $ order value in the parameter, I cannot find the record, but I don't give this value & nbsp;, so I can find five records. I think there are some syntax problems, please point your finger. thank you. ------ solution ------------------ the order clause must be in front of the limit clause. you have a question about how to write a PHP database.
Where is the problem? No records can be found as long as $ order value is assigned to the parameter.
But if this value is not given, five records can be found.
I think there are some syntax problems. please point your finger. thank you.
------ Solution --------------------
The order clause must be before the limit clause, and your code order is reversed, resulting in syntax errors. Generally, limit is the last component of an SQL statement.
By the way, you only find that the value cannot be found, which is actually an SQL statement parsing error. If you do not know how to debug and discover problems, the subsequent steps will be difficult to follow.