Join two table and fetch data!
Posted: Wed Mar 05, 2014 5:08 am
I have two table and want to fetch data from them.
This query working fine:
"Select * from myads join users on myads.id = users.id";
but the problem is I want to use one of the field as counter
For the Single table this works for me:
"SELECT *,(30-DATEDIFF(now(),updateDate)) as counter FROM myads";
Now, my question is how can i combine this two querys.. any help will be helpful.
This query working fine:
"Select * from myads join users on myads.id = users.id";
but the problem is I want to use one of the field as counter
For the Single table this works for me:
"SELECT *,(30-DATEDIFF(now(),updateDate)) as counter FROM myads";
Now, my question is how can i combine this two querys.. any help will be helpful.