By esmailzadeh on
hi all
db_query just allow one line sql command to run
i need to run this sql command:
db_query('
SET @nid = ( SELECT node.nid
FROM content_type_news
INNER JOIN node ON node.nid = content_type_news.nid
WHERE content_type_news.field_home_position_value =0
ORDER BY created DESC
LIMIT 1 ) ;
update content_type_news inner join node on node.nid=content_type_news.nid SET field_home_position_value =1 where node.nid=@nid;
');
how can i do that?
Comments
Crossposted see
Crossposted see http://drupal.org/node/262441.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk