hello mailing list
It is the first time I do something like this, so I hope I do it right :)
(the database can be downloaded, and the SQL can be cut/pasted - see bottom)
Here is the structure and the data:
http://www.mercenaries.ws/db_data.jpg
http://www.mercenaries.ws/db_structure.jpg
--------------------------------------------------------------------------------
Here is the SQL and result:
http://www.mercenaries.ws/sql_and_result.jpg
--------------------------------------------------------------------------------
As you can see, the same color (the last one, emissive) will be the result
for ALL colors. It seems as if your SQL-interpreter cannot handle multiple
definitions of the same table (aliased with AS) in the FROM-clause?
IMO this SQL is fairly simple, and the database should be able to handle it
I have replicated the database in Access, and here it worked as it was
supposed to, so the problem must be 100% within SQLite's domain.
Best regards
Rune Hjelm
PS: If you wanna test it yourself, you can download DB here:
http://www.mercenaries.ws/game.db
This is the SQL in text:
---------------------------------
SELECT terraintype.terrainsupertypeid,
terraintype.terrainsubtypeid,
terraintype.name,
diffuse.r, diffuse.g, diffuse.b, diffuse.a,
ambient.r, ambient.g, ambient.b, ambient.a,
specular.r, specular.g, specular.b, specular.a,
emissive.r, emissive.g, emissive.b, emissive.a,
material.power
FROM terraintype, material, color AS diffuse, color AS ambient, color AS
specular, color AS emissive
WHERE terraintype.materialid=material.materialid
AND material.diffuseid=diffuse.colorid
AND material.ambientid=ambient.colorid
AND material.specularid=specular.colorid
AND material.emissiveid=emissive.colorid
AND terrainsupertypeid=1
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------