0

$result=mysql_query("select employer.employer_id,employer.companyname,post_job.jobtitle,post_job.owner,post_job.tdate,post_job.id from post_job,employer ORDER BY tdate.post_job ASC LIMIT 0,10
") or die("ERROR:".mysql_error());


it is not working..........

2
Contributors
12
Replies
13
Views
9 Years
Discussion Span
Last Post by nav33n
0

#1064 - 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 '$result=mysql_query("select employer.employer_id,employer.companyname,post_job.' at line 1

0

based on the id in post_job table i want to fetch name of the company from employer is my query right

0

Can you post your code ? If you are getting the output in mysql and not in php, there must be something missing in php.

0

ya i can.i am not able to get the output in mysql.i have a field called tdate.it contains dates.when i executed the above query in mysql it is fetching all the fields as per as the query but all the values in tdate is getting displayed as 0000-00-00.but in the table date values are there....

0

Add a condition, where tdate !="0000-00-00" in your query. That will return only valid dates.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.