コード例 #1
0
ファイル: rb.php プロジェクト: tejdeeps/tejcs.com
 /**
  * Executes SQL and returns a one dimensional array result set.
  * This function rotates the result matrix to obtain a column result set.
  * 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 getCol($sql, $aValues = array())
 {
     $this->sql = $sql;
     $this->signal('sql_exec', $this);
     return $this->db->GetCol($sql, $aValues);
 }
コード例 #2
0
ファイル: rb.php プロジェクト: spiogit/cna-seed-project
 /**
  * Executes SQL and returns a one dimensional array result set.
  * This function rotates the result matrix to obtain a column result set.
  * 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 getCol($sql, $aValues = array())
 {
     $this->sql = $sql;
     $this->signal('sql_exec', $this);
     $timer = new $this->performanceTimerClass(PerformanceTimer::CATEGORY_SQL);
     $timer->startTimer();
     $res = $this->db->GetCol($sql, $aValues);
     $timer->stopTimer();
     $timer->saveTime();
     return $res;
 }