Hi. I have problems sorting. Can anyone help me? My output is correct just that the sorting dosen't work, which i want it to be in alphabetical order by the name of Game (column - Game). I'm using this with PHPLib Template and PHPLib dB class
It looks to me like it is sorting each table alphabetically, but since you are outputing more than one table, it starts sorting again for the next table. Is that what the problem is?
The problem with this is your database design. What you should have done is made one table for all of the games, with an additional field called typeId, which links to a table called gameTypes with fields id and name.
Thats how you get it into an array, although I'm not sure how to sort it depending on a field of choice. You can use asort() or array_mutlisort but I don't know which.
Bookmarks