ok this is going to sound weird but here it goes ... i have make a script (PHP + MYSQL) that works just fine locale: SELECT name , id FROM gallery WHERE parent = '$parentID' and published = '1' ORDER BY 'name' ASC localle everything works fine with results like: Album Car Zoe i upload the same script to the server i have and magic ... it is not sorted by name but by 'id' ... what the hell is going on? any help is apreciated.
try this: SELECT name, id FROM gallery WHERE parent = '$parentID' and published = '1' ORDER BY name ASC Code (markup): you were passing "name" as a string into the ORDER BY statement. By default mysql will sort your table by id, that's why you got that on your website. I have no idea though why it worked on localhost
thanks so much for your help . yep no idea why it worked on local host . anyway . its working just fin . thanks again .