SQLTemplate() public method

By default it is in SELECT mode
public SQLTemplate ( string $mode )
$mode string A key for $this->sql_templates
コード例 #1
0
ファイル: pgsql.php プロジェクト: xavocvijay/atkschool
 /** Use extended postgresql syntax for fetching ID */
 function SQLTemplate($mode)
 {
     $template = parent::SQLTemplate($mode);
     switch ($mode) {
         case 'insert':
             return $template . " returning id";
     }
     return $template;
 }
コード例 #2
0
ファイル: firebird.php プロジェクト: atk4/atk4
 public function SQLTemplate($mode)
 {
     $template = parent::SQLTemplate($mode);
     switch ($mode) {
         case 'insert':
             if (empty($this->{$id_field}) !== false) {
                 return $template . ' returning ' . $this->{$id_field};
             }
     }
     return $template;
 }