Here is an example query:
SELECT * FROM userfield, userevent WHERE userfield.field6 = 'US - New York' AND userfield.userid = userevent.userid AND startstamp >= 1101352857 AND startstamp <= 1103944857 AND eventtype LIKE '%12%' OR eventtype LIKE '%14%'
As you can see I'm using 2 tables. I need to take any users which userfield.field6 matches 'US - New York' and then from there I need to search the userevent tables where the rest of the information matches. So basically just get all the userids where it matches US - New York then take all those matching userids in the userevent table and find the matching coorespoding info.
Should be pretty simple I just have no idea how joins work. Any explainations would be greatful!
Yes I've done research also, I cannot seem to get it working!
That's not working... Here is even a simplier query:
SELECT * FROM userfield, userevent WHERE userfield.field6 = 'US - New York' AND userfield.userid = userevent.userid AND startstamp >= 1101357953 AND startstamp <= 1103949953
I need to get all the userids matching userfield.field6 THEN I need to only retrieve the information where the userids match and the stamps are inbetween the info