LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 07-15-2004, 02:41 AM   #1
vi0lat0r
Member
 
Registered: Aug 2003
Location: Lewisville, TX
Distribution: Kubuntu
Posts: 295

Rep: Reputation: 30
PHP MySQL Query Question


I have the following line of code:

$query = mysql_query("SELECT * FROM ".$db["database"].".sections WHERE sid=".$sid);

But I want to make it sort by the field named weight, which contains a numerical value. So basically

Select ALL from database.sections Where sid=sid SORT by weight

But just need the code ;-)
 
Old 07-15-2004, 05:02 AM   #2
pycoucou
Member
 
Registered: Apr 2004
Location: Edinburgh
Posts: 78

Rep: Reputation: 15
If I got it, you just miss 'ORDER BY weight'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
php mcrypt cookie - mysql query lemack Linux - Security 3 02-09-2005 09:21 AM
php/,mysql problem: can't query JJX Linux - General 4 01-06-2005 05:10 PM
php: Why Can't I Query Mysql DB?? flamesrock Programming 7 11-16-2004 12:36 AM
php mysql variable arguments in query. ldp Linux - Software 0 10-26-2004 07:56 AM
Mysql/PHP query problem with datetime field. Pcghost Programming 2 11-11-2003 12:24 PM


All times are GMT -5. The time now is 12:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration