[PHP] Re: sql query and some math

2003-12-17 Thread Kim Steinhaug
Your first query, could it be that you dont have any reference between the two tables? You should have a link between them, like where t1.id=t2id Or else you do not have any reasonable way of predicting the outcome of the query. Atleast this is what I know from my own experience. Especially if

[PHP] Re: sql query and some math

2003-12-17 Thread Sven
Patrik Fomin schrieb: ... q2) i got like 100 matches from a database into a $num variable, then i want to devide that by 3 aslong as it can be done, eg: while ($num != 0) { ïf ($num / 3 = true){ some code to display some fields from a database $num = $num - 3; } else { some other code to display