Hi I am new to php/mysql and I need help with a select statement. The database has 2 tables with the same schema date, user, symbol I basically want to compare both tables and if any "symbol" occur in both tables on the same "date" and by same "user" then I want to return this data/user/symbol. Can I do this with a select statement or do I need to process these 2 tables into a 3rd tables and then select the data from there?
actually that's not accurate enough, because he said "any symbol" and not the same symbol so if i understand correctly , he want to check with restriction to date and user and with NO RESTRICTION AT SYMBOL.. SELECT * FROM table1 , table2 WHERE table1.user=table2.user AND table1.date=table2.date;
This worked great, thanks! I did mean symbol should match, maybe I wasn't clear. Both examples helped me understand more.