unique job role page
Sorry to post again
I have solved all the other issues I think on my admin page but got this one that am stuck on
What should happen is a user clicks on a job and displays on a page of its own, it is getting the jobs from the database
What is happening is on the job.php page I get this error
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 'Designer ORDER BY id desc LIMIT 1' at line 1
Not sure on how to fix it really, I did look round on Google etc
In the address bar it comes up with job.php?id=Web%20Designer
So I think it is sort of working
I have added a pastebin link below with the coding from the job.php page if it helps
Thank you in advance
Find out what the actual query looks like:
Then we can look for why it's generating a SQL syntax error.
$result = mysqli_query($con, $query) or die("Error: ".mysqli_error($con)."\n$query");
PS: You can just post your code here within [php] ... [/php] tags.
Paste the below query in your PHPMyAdmin :
SELECT id, ref, role, division, location, salary, description FROM jobs WHERE division='IT' AND id = 'Web Designer' ORDER BY id desc LIMIT 1
Remember that the number of affected rows and the length of the result set are two different things.
Generally, INSERT, UPDATE and DELETE statements affect rows, while SELECT returns a result set which may be empty if no rows were matched according to the condition.
Hope this helps.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)