-2

I have just moved from windows 5.2.0 to Linux 5.5.34 and have countered this error message within my code. It states that the error is on "line 24"

Here is a screenshot to my code...

https://ibb.co/gQzWLk

leon
  • 1
  • Please post code, errors or textual output here as plain-text, not as images that can be hard to read, can’t be copy-pasted to help test code or use in answers, and are hostile to those who use screen readers. You can edit your question to add the code in the body of your question. Use the `{}` button to format any blocks of code, or indent with four spaces for the same effect. – tadman Apr 26 '17 at 04:10
  • mysql_* is deprecated try to use mysqli_* and issues is your query failing due to some reason . so it's throwing this error . – JYoThI Apr 26 '17 at 04:15

1 Answers1

0

paste following code on line 24 to know what is the error in your query use mysql_error() function, use mysqli or pdo

$qsearch = mysql_query("select * from jobs WHERE $sql_query ORDER BY date desc") or die("Error<br/><br/>".mysql_error());
karthickeyan
  • 372
  • 2
  • 12
  • I have just applied the code to line 23 (or die("Error

    ".mysql_error());) Re enabled line 9 and disabled line 8. And now i receive an error message saying... "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 'ORDER BY date desc' at line 1. This happens when i do a numeric search in my app. Screenshot: https://ibb.co/hruj6Q
    – leon Apr 26 '17 at 05:06
  • $qsearch = mysql_query("select * from jobs WHERE $sql_query ORDER BY date desc") or die("select * from jobs WHERE $sql_query ORDER BY date desc

    ".mysql_error());
    – karthickeyan Apr 26 '17 at 05:30
  • use above which will print the query, then put this query in phpmyadmin or any other to check error in your query – karthickeyan Apr 26 '17 at 05:33