diff --git a/sql.php b/sql.php index 851a618..76ad22f 100644 --- a/sql.php +++ b/sql.php @@ -34,7 +34,7 @@ class SQL { '' ), $que ) . "\n" . print_r ( $p, true ) . "\n\n" ); $statement = $this->h->prepare ( $que ); - switch (count ( $p )) { + switch ((is_array ( $p ) ? count ( $p ) : 1)) { case 0 : break; case 1 : @@ -132,7 +132,7 @@ class SQL { ' ', '' ), $que ) . "\n" . print_r ( $p, true ) . "\n\n" ); - switch (count ( $p )) { + switch ((is_array ( $p ) ? count ( $p ) : 1)) { case 0 : break; case 1 :