Help with prepared statements in PHP?Trying to limit the number of rows/results but I dont know how to do it in a prepared statement. How do I fix this code? I think I need to put something in the bindparam thing.The extra variables are for pagination, which complicates the code a bit.
>>1499667Well try to see if your variables are correct, and make sure they are integers. Track all variables and see what causes the error.I just tried pic related and it works.Also I don't think "select top 5 * from" is correct in MySQL, it looks like code for some other SQL engine. (unless they added it in the latest version or something, I've literally never seen it). Just use limit 5.