Closed (fixed)
Project:
Memcache API and Integration
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2007 at 20:19 UTC
Updated:
9 Dec 2007 at 21:41 UTC
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.