I'm facing problem in Drupal query for order by custom field
Here is my query

```
$result = db_query('SELECT n.nid FROM {node} n WHERE n.type = :ntype', array(':ntype' => 'portfolio'));

```

this work fine but when I change that to this

```
$result = db_query('SELECT n.nid FROM {node} n WHERE n.type = :ntype order by n.field_weight DESC', array(':ntype' => 'portfolio'));

```

That query not working. It saying field not found?