$create_table = "SET FOREIGN_KEY_CHECKS=0;
DROP TABLE IF EXISTS `" .$date."`;
CREATE TABLE `".$date."` (
`transaction_id` varchar(11) NOT NULL,
`name` varchar(255) character set latin1 default NULL,
`price` varchar(255) character set latin1 default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8";
$run_query = mysql_query($create_table);
Ok so i am some what confused as to why my table is not being created with this.
When I insert the query directly into SQL the table is created with no error or issue. So i know the statement is true and syntax is not an issue.
When i create the variable in PHP with the same query, then try to run the query, the same table is then not created in the DB.
Am i missing a step ? usually this is pretty straight forward when working with DB. I would usually grab the data then fetch the array, then extract the data into a set of variables.
Any suggestions ?