I have 2 tables, events and photos
The photos table contains references to uploaded photos as well as the event id that those files refer to.
I am writing some code to output a list of events and want to say whether or not there are any photos associated with that event.
I have a query like this
Note the inclusion of sharePhotos p
Basically I want to count the number of photos that have an eid that matches the id field in shareEvents as well as retrieve the event info from the shareEvents table.
SQL isn't my strong point so can someone help?
Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r
The photos table contains references to uploaded photos as well as the event id that those files refer to.
I am writing some code to output a list of events and want to say whether or not there are any photos associated with that event.
I have a query like this
Code:
SELECT e.id,e.eventName,e.eventLocation,e.publish FROM shareEvents e,sharePhotos p ORDER BY id DESC
Note the inclusion of sharePhotos p
Basically I want to count the number of photos that have an eid that matches the id field in shareEvents as well as retrieve the event info from the shareEvents table.
SQL isn't my strong point so can someone help?
Foamcow Heavy Industries - Web design and ranting
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
I wonder what possesses people to make those animated gifs. Do you just get up in the morning and think, "You know what web design r