Rev 1214 | Rev 1220 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1214 | Rev 1219 | ||
---|---|---|---|
Line 61... | Line 61... | ||
61 | throw new OIDplusSQLException($sql, $this->error()); |
61 | throw new OIDplusSQLException($sql, $this->error()); |
62 | } else { |
62 | } else { |
63 | return new OIDplusQueryResultMySQL($res); |
63 | return new OIDplusQueryResultMySQL($res); |
64 | } |
64 | } |
65 | } else { |
65 | } else { |
66 | if (!is_array($prepared_args)) { |
- | |
67 | throw new OIDplusException(_L('"prepared_args" must be either NULL or an ARRAY.')); |
- | |
68 | } |
- | |
69 | - | ||
70 | foreach ($prepared_args as &$value) { |
66 | foreach ($prepared_args as &$value) { |
71 | // MySQLi has problems converting "true/false" to the data type "tinyint(1)" |
67 | // MySQLi has problems converting "true/false" to the data type "tinyint(1)" |
72 | // It seems to be the same issue as in PDO reported 14 years ago at https://bugs.php.net/bug.php?id=57157 |
68 | // It seems to be the same issue as in PDO reported 14 years ago at https://bugs.php.net/bug.php?id=57157 |
73 | if (is_bool($value)) $value = $value ? '1' : '0'; |
69 | if (is_bool($value)) $value = $value ? '1' : '0'; |
74 | } |
70 | } |