Jump to content

DATE_FORMAT and inner joins


AdRock

Recommended Posts

I have 2 tables i need to join but one of the tables sql has DATE_FORMAT in it.

 

SELECT f.festivalid, f.eventname, f.url, DATE_FORMAT(f.datefrom, '%Y-%m-%d') as f.datefrom, DATE_FORMAT(f.dateto, '%Y-%m-%d') as f.dateto,lf.location, f.postcode, f.additional, f.lat, f.lon, f.conname, f.address1, f.address2, f.city, f.county, post,
f.telephone, f.mobile, f.fax, f.email, f.dances, f.pub, f.disability, f.caravan, f.campsite, f.indoor, f.car, f.train, f.bus, v.total, v.votes
FROM festivals as f, votes as v
WHERE f.festivalid = v.festivalid

 

I get an error message pointing to the DATE_FORMAT....any ideas how to fix this?

Link to comment
https://forums.phpfreaks.com/topic/194356-date_format-and-inner-joins/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.