clean_table.inc 485 B

123456789101112131415
  1. <?PHP
  2. require_once('connect.inc');
  3. // connect + select_db
  4. if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
  5. printf("[clean] Cannot connect to the server using host=%s/%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
  6. $host, $myhost, $user, $db, $port, $socket);
  7. }
  8. if (!mysql_query('DROP TABLE IF EXISTS test', $link)) {
  9. printf("[clean] Failed to drop test table: [%d] %s\n", mysql_errno($link), mysql_error($link));
  10. }
  11. mysql_close($link);
  12. ?>