Hi
I need to select a table that's just been created and whose name is an ID number in a variable called $ID, like this
mysql_query("CREATE TABLE `".$ID."` (`prenom` MEDIUMTEXT NOT NULL, `nom` MEDIUMTEXT NOT NULL,`email` MEDIUMTEXT NOT NULL, `fonction` MEDIUMTEXT NOT NULL)")or die("Create table Error: ".mysql_error());
that works fine, but I don't know how to access it using the same variable
I've tried this :
$res = mysql_query("SELECT * from '".$ID."'");
and
$res = mysql_query("SELECT * from $ID");
but they don't work (supplied argument is not a valid MySQL result resource .... etc etc)
what's the standard way of doing this ?
thanks
😃