this is what it tells me now
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ''12'' at line 1
and this is the code
<?
$day=date(j);
$month=date(n);
if($day=1)
{
include("../_includes/db_fns.php");
$db=db_connect();
$table=$month-1;
if($table==0){$table=12;}
$sql = "TRUNCATE TABLE '$table'";
mysql_query($sql) or die(mysql_error());
}
?>
so whats wrong now?
P.S. what is a better idea for tables for the months. I am trying to build a calender feature for vaction rentals that can support multiple houses calendars?