F
F
furashcka2015-07-09 01:57:55
PHP
furashcka, 2015-07-09 01:57:55

PDO & memcache Conflict?

one)

$pdo = new PDO(...);
$mem_obj = new Memcache;
...
...
...
$this->mem_obj->connect('127.0.0.1', 11211);
$this->pdo->exec('UPDATE table SET id=1, unixtime = 1436392795');

2)
$pdo = new PDO(...);
$mem_obj = new Memcache
...
...
...
$this->pdo->exec('UPDATE table SET id=1, unixtime = 1436392795');
$this->mem_obj->connect('127.0.0.1', 11211);

After block execution 2) updates only id, unixtime 0 becomes
After block execution 1) all data is correctly updated... but arithmetic operations and the UNIX_TIMESTAMP() function in MySQL do not work
What is the reason for this? Is PDO also using port 11211?
id -> type INT VALUE 10
unixtime -> type BIGINT VALUE 20
MySQL database

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
furashcka, 2015-07-10
@furashcka

the bug was found not at all where I expected, sorry for bothering you in vain, thanks everyone! There is no conflict!

R
Ruslan Fedoseev, 2015-07-09
@martin74ua

$this is to blame? :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question