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

    Join Date
    Jul 2000
    Posts
    1
    Rep Power
    0
    How to create a MySQL table with PHP?
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    that is very simple..

    see an example...

    <?php
    $con=mysql_connect('localhost','yourusername','yourpassword');

    mysql_select_db('yourdatabasename',$con);

    $query="create table emp(ename varchar(30))";
    mysql_query($query,$con);

    echo "ok!! Table has created now n";
    ?>

    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited July 03, 2000).]

Similar Threads

  1. Help with CREATE TEMPORARY TABLE
    By C3P0 in forum MySQL Help
    Replies: 0
    Last Post: February 16th, 2004, 02:50 PM
  2. Problem: Displaying image link inside table from MySQL
    By Shadowz in forum PHP Development
    Replies: 4
    Last Post: February 13th, 2004, 01:37 AM
  3. Data Entry in MysQl using PHP (with conditions)
    By necropsy in forum PHP Development
    Replies: 1
    Last Post: February 11th, 2004, 01:19 PM
  4. Replies: 5
    Last Post: February 11th, 2004, 02:18 AM
  5. Replies: 0
    Last Post: February 10th, 2004, 11:44 PM

IMN logo majestic logo threadwatch logo seochat tools logo