I was trying to figure out how to use the Weight field from a SQL query and I couldn't find anything until I finally read the code. I hope someone finds this quicker and easier. If you're going to do something like db_query(db_rewrite_sql($sql)):

$sql = "SELECT ... FROM {node} n ... ORDER BY n.sticky DESC"

Just make sure these nodes queried are enabled for Weight otherwise you'll simply be sorting on the sticky flag, not a Weight.

Comments

davisben’s picture

Status: Active » Closed (won't fix)

Not sure there is anything to do here.