Image

Imageavalonmissy wrote in Imagephp 😯confused

Creating a table dynamically

I'm running this bit of PHP script in a page I'm writing for a real estate's site:
$query = "CREATE TABLE 'mls" . $mls . "' ('id' INT NOT NULL AUTO_INCREMENT,'photo' VARCHAR(50) NOT NULL, PRIMARY KEY ('id'))";
$result = mysql_query($query) or die("Query failed : " . mysql_error());

The idea is that it's supposed to create a table named using a variable in the database. I would like to be able to dynamically create and drop tables as real estate listings are added and deleted. I just tried it out and it didn't work. No errors but the table didn't appear in the db when I went to look using phpMyAdmin. Is there something wrong with my code or is what I'm trying to do not possible?