MySQL Query Help
I have 2 tables on my DB, called PredictionData and MatchData, the first one is where all the predictions of the user are stored, the second table is where the real scores are stored. I have the following formula and I would like some help to create the SELECT on base that formula:
Formula: The user predict: ITA = 3 ESP = 2 The real scores: ITA = 4 ESP = 2 If the user predict that ITALY wins and ITALY win then count that one. Or if the user predict that SPAIN wins and SPAIN win then just count that one. I was creating a select like the below but it weird... It will be great if someone can help here. Thanks PHP Code:
|
Please post your table descriptions, and some data from the tables (perhaps 10 rows of data from each table.) It's difficult to write SQL without knowing that information!
|
All times are GMT -5. The time now is 06:53 AM. |