欢迎各位兄弟 发布技术文章
这里的技术是共享的
se {
if ($wildcard) {
if ($cid == '*') {
db_query("TRUNCATE TABLE {". $table ."}");
}
else {
db_query("DELETE FROM {". $table ."} WHERE cid LIKE '%s%%'", $cid);
}
}
else {
db_query("DELETE FROM {". $table ."} WHERE cid = '%s'", $cid);
}
cache.inc 大约169行左右
function db_drop_table(&$ret, $table) {
$ret[] = update_sql('DROP TABLE {' . $table . '}');
}
来自 https://api.drupal.org/api/drupal/includes!database.pgsql.inc/function/db_drop_table/6
function update_sql($sql) {
$result = db_query($sql, true);
return array(
'success' => $result !== FALSE,
'query' => check_plain($sql),
);
}
来自 https://api.drupal.org/api/drupal/includes!database.inc/function/update_sql/6