File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,10 @@ public function execute($args=Pinoco_OptionalParam::UNSPECIFIED)
7272 {
7373 $ args = func_get_args ();
7474 $ args = Pinoco_OptionalParam::trim ($ args );
75- if (count ($ args ) == 1 ) {
75+ if (count ($ args ) == 0 ) {
76+ $ args = null ;
77+ }
78+ elseif (count ($ args ) == 1 ) {
7679 $ args = $ args [0 ];
7780 if ($ args instanceof Pinoco_ArrayConvertible) {
7881 $ args = $ args ->toArray ();
Original file line number Diff line number Diff line change @@ -65,6 +65,15 @@ public function testPrepareQuery()
6565 $ this ->assertEquals ('aaa ' , $ rs [0 ]->value );
6666 $ this ->assertEquals ($ b_id , $ rs [1 ]->id );
6767 $ this ->assertEquals ('bbb ' , $ rs [1 ]->value );
68+
69+ $ s = $ this ->db ->prepare ("insert into foo (value) values(:d); " );
70+ $ s ->bindValue (':d ' , 'ddd ' );
71+ $ s ->execute ();
72+ $ d_id = $ this ->db ->lastInsertId ();
73+ $ r = $ this ->db ->prepare (
74+ "select * from foo where id=:id; "
75+ )->query ($ d_id )->fetchOne ();
76+ $ this ->assertEquals ($ d_id , $ r ->get ('id ' ));
6877 }
6978
7079 public function testStatement ()
You can’t perform that action at this time.
0 commit comments