I need transaction for update, i do:
$sql = 'BEGIN;SET TRANSACTION ISOLATION LEVEL Serializable;
UPDATE partner_statistic
SET "views_count"="views_count"+1
WHERE "id"=15
RETURNING id;
COMMIT;';
Transaction query success,but I use unit test, and not test this transaction But i don't get success result with pg_query, whow I can test ?
每个查询一次调用pg_query。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.