0
I have 2 tables in my database, a call pessoas
and another call resultado
, I am filling the table result with the draws made by mega sena, the table result has the fields:
data, dez1, dez2, dez3, dez4, dez5, dez6
Already the table people have the fields:
nome, dez1, dez1, dez3, dez4, dez5, dez6
I would like to make a select where show me exactly which balls people hit, in case show the tens that are equal in the two tables, they have no foreign key.
in case I want to compare the dez1 of people to the 6 tens of the result, I have to repeat those 6 steps in the 6 tens ne
– Renan Carvalho
@Renancarvalho I did an update there answer, with your doubt, I hope to have been able to help
– Tmc
thank you very much my friend, unfortunately does not solve my case, but I thank from now on your help, I think this missing me knowledge, I go from the one studied better in another way to achieve this, I have tried in java and php but nothing, I want to make 2 tables where one had the results of the mega and the other the bets of the people, in every result of the mega sena the program would check in the bets of the people and mark how many balls each person hit and missed, if you know something I can study to get this done I appreciate it again
– Renan Carvalho
@Renancarvalho my solution works with php, java, or with any other language although it is not the most correct, it is necessary to create a routine within a while, something like: 1ºusa "while i < 6 do chamarotina(i); i = i+1"; 2nd in routine query and save values in a list. Try something like that, anything doubt or explanation a little more detailed warn.
– Tmc