@@ 292-307 (lines=16) @@ | ||
289 | * @return bool true if success, false if an error occured |
|
290 | * |
|
291 | */ |
|
292 | public function dropTable() |
|
293 | { |
|
294 | global $xoopsDB; |
|
295 | ||
296 | $query = sprintf('DROP TABLE %s', $this->name()); |
|
297 | $ret = $xoopsDB->query($query); |
|
298 | if (!$ret) { |
|
299 | echo "<li class='err'>" . sprintf(_AM_SPARTNER_DB_MSG_DROP_TABLE_ERR, $this->name()) . '</li>'; |
|
300 | ||
301 | return false; |
|
302 | } else { |
|
303 | echo "<li class='ok'>" . sprintf(_AM_SPARTNER_DB_MSG_DROP_TABLE, $this->name()) . '</li>'; |
|
304 | ||
305 | return true; |
|
306 | } |
|
307 | } |
|
308 | ||
309 | /** |
|
310 | * Use to alter a table |
@@ 410-425 (lines=16) @@ | ||
407 | * @return bool true if success, false if an error occured |
|
408 | * |
|
409 | */ |
|
410 | public function dropTable() |
|
411 | { |
|
412 | global $xoopsDB; |
|
413 | ||
414 | $query = sprintf('DROP TABLE %s', $this->name()); |
|
415 | $ret = $xoopsDB->query($query); |
|
416 | if (!$ret) { |
|
417 | echo ' ' . sprintf(_SDU_MSG_DROP_TABLE_ERR, $this->name()) . '<br>'; |
|
418 | ||
419 | return false; |
|
420 | } else { |
|
421 | echo ' ' . sprintf(_SDU_MSG_DROP_TABLE, $this->name()) . '<br>'; |
|
422 | ||
423 | return true; |
|
424 | } |
|
425 | } |
|
426 | ||
427 | /** |
|
428 | * Use to alter a table |