hi all together!

i'm turning to your mailinglist as last chance to find s.o. helping me with my problem.

the situation is as follows:

i got a table on a mysql-database, queriing it by php4. the table consists of all 
planets of the planetarion.com-system. these information consists of each 3 
coordinates of a planet (x, y and z), identifiing a planet clearly. theese 3 coords 
are written in a int-field, each. other information are the name of the planet, the 
rulers name, the score and the size of the planet. when the first two coords (x and y) 
of 2 planet are equal, the planets belong to the same galaxie. and now the point:

i try queriing the database as follows:

the user inserts some wished dates (the lowest score, the searched planet may have, 
the highest, the highest number of roids and the lowest..) and the number-interval in 
wich the _galaxy-score_ may be included. (means x > galaxy-sore > y). the problem is, 
to query that! the first query is very simple: "SELECT * FROM Planetarion WHERE Score 
> $x AND Score < $y AND Size > $a AND Size < $B". how how you get the galaxie-score 
for that?? the second query alone is very simple, too: "SELECT SUM(Score) as Summe 
FROM $table WHERE X = $x AND Y = $y GROUP BY X, Y". 

_But how to combine both queries???_

i tried getting the first one and process for each elemnt of it the second one... but 
then the resources of my server will get low, when the first query results eg. 300 
elements or more....

i tried asking the german newsgroup and other people i know, using mysql. and you're 
my very last hope to solve this problem....

thank you very much for each help!!

regards,
dotcom

Reply via email to