Hi, I think that this is trivial, but if you see the core function cache_get() in includes/cache.inc you can view that not use 100% placeholders (only use 2 of 3 :/) in 2 SQL querys, see lines 22 and 25 in includes/cache.inc, look at $table var:

    db_query("DELETE FROM {". $table ."} WHERE expire != %d AND expire <= %d", CACHE_PERMANENT, $cache_flush);
  }

  $cache = db_fetch_object(db_query("SELECT data, created, headers, expire, serialized FROM {". $table ."} WHERE cid = '%s'", $cid));

This is ok? You should use all replacements when needed variables in SQL queries, no?

Comments

damien tournoud’s picture

Status: Active » Closed (works as designed)

Those are (sanitized) table names. Placeholders are for values, not identifiers.