Jump to content


Photo

Running two queries


  • Please log in to reply
2 replies to this topic

#1 j3rmain3

j3rmain3
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 29 September 2006 - 09:57 AM

I have a table which is produced using a form. My problem is i want to sort the table in a descending order from the points field.

I know the coding is

$sort = "select f_name, l_name, points from players ORDER BY points DESC";

But i already have this query above it to show the table

$query = "select * from players";

And it is not letting me run both queries. is it because it can only perform one?

I even done an if statement but it still did not do anything.

Do i have to do a loop?

Thanks
J3rmain3



#2 steveclondon

steveclondon
  • Members
  • PipPipPip
  • Advanced Member
  • 161 posts

Posted 29 September 2006 - 09:59 AM

$query = "SELECT * from players ORDER BY points DESC";

#3 j3rmain3

j3rmain3
  • Members
  • PipPipPip
  • Advanced Member
  • 40 posts

Posted 29 September 2006 - 10:24 AM

Its working now

Help was much appreciated. Thank You

J3rmain3




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users