MkFramework
 All Data Structures Functions
sgbd_syntax_firebird.php
1 <?php
2 /*
3 This file is part of Mkframework.
4 
5 Mkframework is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License.
8 
9 Mkframework is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13 
14 You should have received a copy of the GNU Lesser General Public License
15 along with Mkframework. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
19 
20  public static function getListColumn($sTable){
21  return 'select f.rdb$field_name from rdb$relation_fields f
22  join rdb$relations r on f.rdb$relation_name = r.rdb$relation_name
23  and r.rdb$view_blr is null
24  and (r.rdb$system_flag is null or r.rdb$system_flag = 0)
25 
26  WHERE f.rdb$relation_name=\''.$sTable.'\' ';
27  }
28  public static function getStructure($sTable){
29  return 'select f.rdb$field_name from rdb$relation_fields f
30  join rdb$relations r on f.rdb$relation_name = r.rdb$relation_name
31  and r.rdb$view_blr is null
32  and (r.rdb$system_flag is null or r.rdb$system_flag = 0)
33 
34  WHERE f.rdb$relation_name=\''.$sTable.'\' ';
35  }
36  public static function getListTable(){
37  return 'select rdb$relation_name from rdb$relations where rdb$view_blr is null and (rdb$system_flag is null or rdb$system_flag = 0);';
38  }
39  public static function getLimit($sRequete,$iOffset,$iLimit){
40  return $sRequete.' LIMIT '.$iOffset.','.$iLimit;
41  }
42  public static function getLastInsertId(){
43  return 'SELECT LAST_INSERT_ID()';
44  }
45 }