Jump to content

[SOLVED] Is this possible? Create a Table from a Variable?


CoreyR

Recommended Posts

I'm trying to create tables from username, is this possible? I would think it was, but I know I have the syntax wrong. Thanks for helping.

 

$query = 'CREATE TABLE "$username"( '.
         'cid INT NOT NULL AUTO_INCREMENT, '.
         'cname VARCHAR(20) NOT NULL, '.
         'cemail VARCHAR(50) NOT NULL, '.
         'csubject VARCHAR(30) NOT NULL, '.
         'cmessage TEXT NOT NULL, '.
         'PRIMARY KEY(cid))';

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.