I have had a good look here and at MySql.org for an answer:
I have the following sql statement to create a table:
$sql = "'CREATE TABLE fotoTable ('
. ' `id` INT NOT NULL AUTO_INCREMENT, '
. ' `userid` TEXT NOT NULL, '
. ' `filename` TEXT NOT NULL, '
. ' `title` TEXT NOT NULL, '
. ' `comment` BLOB NOT NULL,'
. ' PRIMARY KEY (`id`)'
. ' )';";
This names the table fotoTable which is fine, but what I really want to do is for each new table that is created to be named as the username of the person logged into my site.
The question is how do I pass the userid variable to the name of the table?
Your help would be much appreciated - I'm sure it's simple, but I've tried so many things?!
Rupert