<?php
include 'db.php';
$db=DB::getInstance();
//returns all table name in array
$tables = $db->assoc_arr("SHOW TABLES");
//print_r($tables);
//function thats drop table
function drop($table_name)
{
global $db;
if($db->query("DROP TABLE `$table_name`")===TRUE)
{
return TRUE;
}
else
{
return FALSE;
}
}
// get number of rows
$num=$db->num_rows("select * from schedule where date='$today' and time='$time'");
print_r($num);
|