Subversion Repositories oidplus

Rev

Rev 1218 | Rev 1220 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1218 Rev 1219
Line 95... Line 95...
95
                                if (!@odbc_execute($ps, $prepared_args)) {
95
                if (!@odbc_execute($ps, $prepared_args)) {
96
                                        $this->last_error = odbc_errormsg($this->conn);
96
                        $this->last_error = odbc_errormsg($this->conn);
97
                                        throw new OIDplusSQLException($sql, $this->error());
97
                        throw new OIDplusSQLException($sql, $this->error());
98
                                }
98
                }
99
                                return new OIDplusQueryResultODBC($ps);
99
                return new OIDplusQueryResultODBC($ps);
100
 
-
 
101
        }
100
        }
102
 
101
 
103
        /**
102
        /**
104
         * @param string $sql
103
         * @param string $sql
105
         * @param array|null $prepared_args
104
         * @param array|null $prepared_args
Line 161... Line 160...
161
                                throw new OIDplusSQLException($sql, $this->error());
160
                                throw new OIDplusSQLException($sql, $this->error());
162
                        } else {
161
                        } else {
163
                                return new OIDplusQueryResultODBC($res);
162
                                return new OIDplusQueryResultODBC($res);
164
                        }
163
                        }
165
                } else {
164
                } else {
166
                        if (!is_array($prepared_args)) {
-
 
167
                                throw new OIDplusException(_L('"prepared_args" must be either NULL or an ARRAY.'));
-
 
168
                        }
-
 
169
 
-
 
170
                        if ($this->forcePrepareEmulation()) {
165
                        if ($this->forcePrepareEmulation()) {
171
                                return $this->doQueryPrepareEmulation($sql, $prepared_args);
166
                                return $this->doQueryPrepareEmulation($sql, $prepared_args);
172
                        } else {
167
                        } else {
173
                                return $this->doQueryInternalPrepare($sql, $prepared_args);
168
                                return $this->doQueryInternalPrepare($sql, $prepared_args);
174
                        }
169
                        }