Revision of SQL in (), db_placeholders from Tue, 2013-01-01 20:11

找出已發佈的,類型為 Page 或 Story 的 node:

<?php
$sql
= "SELECT * FROM {node} WHERE status = '%d' AND type IN (".db_placeholders($types, 'varchar').") ";

$r = db_query($sql, array_merge((array)$status, $types));
?>
Google