Web Design Forum: mysql order by - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

mysql order by Rate Topic: -----

#1 User is offline   ELITE 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 778
  • Joined: 30-March 08
  • Reputation: 0
  • Gender:Male
  • Location:stoke on trent
  • Experience:Intermediate
  • Area of Expertise:Coder

Posted 05 August 2009 - 09:26 PM

help please i am trying to add an order by member_id desc to the following

$sql = "select * from members where username=" . $this->db->escape($username);

can you help thanks
0

#2 User is offline   dcman007 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 37
  • Joined: 29-July 09
  • Reputation: 2
  • Gender:Male
  • Location:Stoke on Trent, Staffordshire
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 06 August 2009 - 11:28 AM

I think the syntax you'll be needing is something like this:

$sql = "select * from members where username= '".$this->db->escape($username)."' ORDER BY member_id DESC";
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users