Hello, I am making a map program for a little online game I am creating. The maps are made up of 'squares'. The square values are stored accross two tables, letal, and data. The table letal contains basic stuff like the square name. The data table contains the square's x and y cordinate. This is an example:
TABLE: letal
letalid | letalname
27 | example
TABLE: data
dataid | letalid | dataname | datavalue
68 | 27 | x-coordinate | 112
69 | 27 | y-coordinate | -67
As you can see, the x and y cordiantes are stored in seperate rows. This is my question: How do you make a query so that it select the letalid, letalname, x-coordinate (datavalue), and y-coordinate (also datavalue) so that all of them are in ONE row in the result. Also, how would I go about sorting by the x and y coordinates?
I am sorry if it is unclear what I am trying to do, I don't really know how to explain this.
Thanks for any help.