Q:

Whats wrong with my drush script when using sql?

Im running the following via drush scr
$query = db_query('select node.nid AS nid from {node} node where (type="feed_item") AND (status="0") limit 1');

i am getting this error:

WD php: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown
  column 'feed_item' in 'where clause': select node.nid AS nid from
  [error] {node} node where (type="feed_item") AND (status="0") limit 1;
  Array ( )  in include() (line 5 of
  /home/quickstart/websites/xc.dev/deleteme.php). [4.77 sec, 97.55 MB]
  PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column
  'feed_item' in 'where clause': select node.nid AS
  nid from {node} node where (type="feed_item") AND (status="0") limit
  1; Array ( )  in include() (line 5 of
  /home/quickstart/websites/xc.dev/deleteme.php). Drush command
  terminated abnormally due to an unrecoverable error. [4.79 sec, 97.55
  MB]

Whats wrong?

A:

i think the problem is in the " / ' , try it this way :
$q = db_query("
select node.nid AS nid from {node} node where (type='feed_item') 
AND (status=0) limit 1");

