/** * Executes SQL and fetches a single row. * This function allows you to provide an array with values to bind * to query parameters. For instance you can bind values to question * marks in the query. Each value in the array corresponds to the * question mark in the query that matches the position of the value in the * array. You can also bind values using explicit keys, for instance * array(":key"=>123) will bind the integer 123 to the key :key in the * SQL. * * @param string $sql SQL code to execute * @param array $values assoc. array binding values * * @return array $result one dimensional array result set */ public function getRow($sql, $aValues = array()) { $this->sql = $sql; $this->signal('sql_exec', $this); return $this->db->GetRow($sql, $aValues); }
/** * Executes SQL and fetches a single row. * This function allows you to provide an array with values to bind * to query parameters. For instance you can bind values to question * marks in the query. Each value in the array corresponds to the * question mark in the query that matches the position of the value in the * array. You can also bind values using explicit keys, for instance * array(":key"=>123) will bind the integer 123 to the key :key in the * SQL. * * @param string $sql SQL code to execute * @param array $values assoc. array binding values * * @return array $result one dimensional array result set */ public function getRow($sql, $aValues = array()) { $this->sql = $sql; $this->signal('sql_exec', $this); $timer = new $this->performanceTimerClass(PerformanceTimer::CATEGORY_SQL); $timer->startTimer(); $res = $this->db->GetRow($sql, $aValues); $timer->stopTimer(); $timer->saveTime(); return $res; }