File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,15 +99,21 @@ function dump_rows($q) {
9999 }
100100}
101101
102- function dump_table_rows ($ table ) {
103- dump_rows (ibase_query (sprintf ('SELECT * FROM "%s" ' , $ table )));
102+ function dump_table_rows ($ table , $ tr = null ) {
103+ if ($ tr )$ args [] = $ tr ;
104+ $ args [] = sprintf ('SELECT * FROM "%s" ' , $ table );
105+
106+ dump_rows (ibase_query (...$ args ));
104107}
105108
106- function insert_into ($ table , $ data ) {
109+ function insert_into ($ table , $ data , $ tr = null ) {
110+ if ($ tr ) $ args [] = $ tr ;
107111 [$ fields_str , $ q_str ] = array2sql_parts ($ data );
108- return ibase_query ( sprintf ('INSERT INTO "%s" (%s) VALUES (%s) ' ,
112+ $ args [] = sprintf ('INSERT INTO "%s" (%s) VALUES (%s) ' ,
109113 $ table , $ fields_str , $ q_str
110- ), ...array_values ($ data ));
114+ );
115+
116+ return ibase_query (...array_merge ($ args , array_values ($ data )));
111117}
112118
113119/** @var float $v */
You can’t perform that action at this time.
0 commit comments