mirror of
https://github.com/php/php-src.git
synced 2024-12-14 12:26:19 +08:00
- Fix test
This commit is contained in:
parent
d4baef3d92
commit
b2e1e98f08
@ -8,14 +8,14 @@ PDO_Firebird: DDL/transactions
|
||||
require("testdb.inc");
|
||||
|
||||
$db = new PDO("firebird:dbname=$test_base",$user,$password) or die;
|
||||
$db->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_WARNING);
|
||||
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
|
||||
|
||||
$db->exec("CREATE TABLE ddl (id INT NOT NULL PRIMARY KEY, text BLOB SUB_TYPE 1)");
|
||||
$db->exec("CREATE GENERATOR gen_ddl_id");
|
||||
$db->exec("CREATE TRIGGER ddl_bi FOR ddl BEFORE INSERT AS
|
||||
BEGIN IF (NEW.id IS NULL) THEN NEW.id=GEN_ID(gen_ddl_id,1); END");
|
||||
|
||||
$db->setAttribute(PDO_ATTR_AUTOCOMMIT,0);
|
||||
$db->setAttribute(PDO::ATTR_AUTOCOMMIT,0);
|
||||
|
||||
$db->beginTransaction();
|
||||
var_dump($db->exec("INSERT INTO ddl (text) VALUES ('bla')"));
|
||||
|
Loading…
Reference in New Issue
Block a user