Fatal error: SQL in /home/trilocus/public_html/database/characters.php on line 140
Here is line 140:
$sql = "SELECT id, name FROM npcs LIMIT $offset, $rowsperpage WHERE name LIKE $search";
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your query should be:
Please, note single quotes “around” $search and LIMIT is after WHERE.
Also, use prepared sql statements or mysql escape, the way you are doing this is perfect for SQL injection attack.