| @@ 336-346 (lines=11) @@ | ||
| 333 | * |
|
| 334 | * @return bool true if exists or false if doesnt |
|
| 335 | */ |
|
| 336 | public function tableExists($table) |
|
| 337 | { |
|
| 338 | $table = trim($table); |
|
| 339 | $ret = false; |
|
| 340 | if ($table != '') { |
|
| 341 | $this->db->connect(); |
|
| 342 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix($table); |
|
| 343 | $ret = (false != $this->db->query($sql)) ? true : false; |
|
| 344 | } |
|
| 345 | return $ret; |
|
| 346 | } |
|
| 347 | ||
| 348 | /** |
|
| 349 | * This method allows to copy fields from one table to another |
|
| @@ 226-236 (lines=11) @@ | ||
| 223 | return $deleted; |
|
| 224 | } |
|
| 225 | ||
| 226 | function tableExists($table) |
|
| 227 | { |
|
| 228 | $table = trim($table); |
|
| 229 | $ret = false; |
|
| 230 | if ($table != '') { |
|
| 231 | $this->db->connect(); |
|
| 232 | $sql = 'SELECT COUNT(*) FROM ' . $this->db->prefix($table); |
|
| 233 | $ret = (false != $this->db->query($sql)) ? true : false; |
|
| 234 | } |
|
| 235 | return $ret; |
|
| 236 | } |
|
| 237 | } |
|
| 238 | ||
| 239 | ?> |
|