1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Rep Power
    Hi there.. sorry to ask another stupid question.. but how does one go about creating a table on the fly? I've got the PHP script generating a random table name.. it's all being done in MySQL (predictably) and PHP.. any help would be great..
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Caro, Michigan
    Rep Power
    You use the same command as you would from the command line, only in mysql_query()

    $result = mysql_query("CREATE TABLE $your_table (id INT,var TEXT)");

    for example...

    ---John Holmes...

Similar Threads

  1. Tables expanding vertically, creating gaps in images??
    By jriga in forum HTML Programming
    Replies: 0
    Last Post: January 31st, 2004, 10:32 AM
  2. Replies: 8
    Last Post: January 9th, 2004, 06:42 PM
  3. creating database & tables using ASP
    By pdxlooie in forum ASP Programming
    Replies: 2
    Last Post: December 26th, 2003, 05:27 PM
  4. creating relationships between tables
    By deano in forum MySQL Help
    Replies: 1
    Last Post: November 13th, 2003, 11:24 AM
  5. Creating multiple tables from a text file
    By Grouchie in forum MySQL Help
    Replies: 3
    Last Post: October 6th, 2003, 11:17 AM

IMN logo majestic logo threadwatch logo seochat tools logo