@@ -6,6 +6,9 @@ discard block |
||
| 6 | 6 | public $dbs = array(); |
| 7 | 7 | public $latest_schema = 37; |
| 8 | 8 | |
| 9 | + /** |
|
| 10 | + * @param string $dbname |
|
| 11 | + */ |
|
| 9 | 12 | public function __construct($dbc = null,$dbname = null,$user = null,$pass = null) { |
| 10 | 13 | global $globalDBdriver, $globalNoDB; |
| 11 | 14 | if (isset($globalNoDB) && $globalNoDB === TRUE) return true; |
@@ -133,6 +136,9 @@ discard block |
||
| 133 | 136 | return true; |
| 134 | 137 | } |
| 135 | 138 | |
| 139 | + /** |
|
| 140 | + * @param string $table |
|
| 141 | + */ |
|
| 136 | 142 | public function tableExists($table) |
| 137 | 143 | { |
| 138 | 144 | global $globalDBdriver, $globalDBname; |
@@ -182,6 +188,11 @@ discard block |
||
| 182 | 188 | /* |
| 183 | 189 | * Check if index exist |
| 184 | 190 | */ |
| 191 | + |
|
| 192 | + /** |
|
| 193 | + * @param string $table |
|
| 194 | + * @param string $index |
|
| 195 | + */ |
|
| 185 | 196 | public function indexExists($table,$index) |
| 186 | 197 | { |
| 187 | 198 | global $globalDBdriver, $globalDBname; |
@@ -224,6 +235,10 @@ discard block |
||
| 224 | 235 | return $columns; |
| 225 | 236 | } |
| 226 | 237 | |
| 238 | + /** |
|
| 239 | + * @param string $table |
|
| 240 | + * @param string $column |
|
| 241 | + */ |
|
| 227 | 242 | public function getColumnType($table,$column) { |
| 228 | 243 | $select = $this->db->query('SELECT '.$column.' FROM '.$table); |
| 229 | 244 | $tomet = $select->getColumnMeta(0); |
@@ -234,6 +249,11 @@ discard block |
||
| 234 | 249 | * Check if a column name exist in a table |
| 235 | 250 | * @return Boolean column exist or not |
| 236 | 251 | */ |
| 252 | + |
|
| 253 | + /** |
|
| 254 | + * @param string $table |
|
| 255 | + * @param string $name |
|
| 256 | + */ |
|
| 237 | 257 | public function checkColumnName($table,$name) |
| 238 | 258 | { |
| 239 | 259 | global $globalDBdriver, $globalDBname; |