Link to home
Start Free TrialLog in
Avatar of frosty1
frosty1

asked on

how order by weigh in drupal sql statement

i have the following drupal sql. Wondering how would i order the following be weight

SELECT node.nid FROM node node  LEFT JOIN content_type_videoclip videoclip ON node.vid = videoclip.vid WHERE node.type in ('videoclip')
Avatar of Juamez
Juamez

If you mean a simple SQL addendum, then you can add this to your query: ORDER BY <name of row> [ascending | descending (optional)]

By what row do you want to order the query exactly?
Avatar of frosty1

ASKER

yeah, i don't know where the weight col is in drupal. Where is this stored
I don't know what you mean by weight. Is it a collection of criteria like filesize, video dimensions, ... ?
Avatar of frosty1

ASKER

in drupal, when you add an item to the menu you get give it a weight. it's basically says where in the menu it should go. So i want to use this value to order my select statement
Oh I see! Maybe you can look in the code of the page that inserts the data into the database, look for the table and column where it puts the new value. I don't have drupal here myself now, so I can't look.
ASKER CERTIFIED SOLUTION
Avatar of junipllc
junipllc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Were you able to find the weight you needed in that column?