db_query("UPDATE {$table} SET data = %b, created = %d, expire = %d, headers = '%s', serialized = %d WHERE cid = '%s'", $data, time(), $expire, $headers, $serialized, $cid);
should be:
db_query("UPDATE {{$table}} SET data = %b, created = %d, expire = %d, headers = '%s', serialized = %d WHERE cid = '%s'", $data, time(), $expire, $headers, $serialized, $cid);
@db_query("INSERT INTO {$table} (cid, data, created, expire, headers, serialized) VALUES ('%s', %b, %d, %d, '%s', %d)", $cid, $data, time(), $expire, $headers, $serialized);
should be:
@db_query("INSERT INTO {{$table}} (cid, data, created, expire, headers, serialized) VALUES ('%s', %b, %d, %d, '%s', %d)", $cid, $data, time(), $expire, $headers, $serialized);
Otherwise one cannot prefix the cache tables as you might want. "{$var}" syntax denotes a variable in a string in PHP syntax. There are obviously other ways to write the syntax to make it work like substituting strings, %s.
Comments
Comment #1
robertdouglass commentedGood catch. Thanks for reporting. How my eyes tricked me!
Comment #2
robertdouglass commentedComment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.