Jump to content


Photo

sorting data


  • Please log in to reply
3 replies to this topic

#1 phplee

phplee
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 27 May 2004 - 09:44 AM

i am trying to sort data that i am getting from a mysql database in alphabetical order, does anyone know what strip of code i might use to do this?

e.g.
$Description = $newArray['Description'];
$EstablishmentName = $newArray['EstablishmentName'];

echo "$EstablishmentName,
$Description

this gives me a list, can i sort it?

any help much appreciated
thanks
lee

#2 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 27 May 2004 - 09:55 AM

Use the wizard and change sort to asc or desc (ascending or descending) dependant on which way you wish to display the results.

#3 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 27 May 2004 - 09:58 AM

Or you could press F1 and read the onboard manual. Look in the developing php apllications readily section. You can also download for free from Mac's website the better manual in .pdf format and print yourselves a copy.

#4 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 27 May 2004 - 10:35 AM

Use the wizard and change sort to asc or desc (ascending or descending) dependant on which way you wish to display the results.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users