Results 1 to 5 of 5

Thread: Php table

  1. #1
    jacismeth is offline Sophomore
    Join Date
    Oct 2011
    Posts
    50
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Feedback Score
    0

    Default Php table

    Hii

    How to create a table in PHP ? help me frd............

  2. #2
    Sather123 is offline Junior
    Join Date
    Jul 2011
    Posts
    300
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Feedback Score
    0

    Default

    PHP MySQL Create Database and Tables........The following example creates a database called "my_db":
    <?php
    $con = mysql_connect("localhost","peter","abc123");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }

    if (mysql_query("CREATE DATABASE my_db",$con))
    {
    echo "Database created";
    }
    else
    {
    echo "Error creating database: " . mysql_error();
    }

    mysql_close($con);
    ?>

  3. #3
    Mensink123 is offline Junior
    Join Date
    Jul 2011
    Posts
    440
    Thanks
    0
    Thanked 4 Times in 4 Posts
    Feedback Score
    0

    Default

    The following example creates a database called "my_db": The CREATE TABLE statement is used to create a table in MySQL.

    CREATE TABLE table_name(
    column_name1 data_type,column_name2 data_type,column_name3 data_type,
    ....

    )

  4. #4
    Dasman123 is offline Banned
    Join Date
    Jul 2011
    Posts
    342
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    PHP table to excel . It include


    //EDIT YOUR MySQL Connection Info:
    $DB_Server = ""; //your MySQL Server
    $DB_Username = ""; //your MySQL User Name
    $DB_Password = ""; //your MySQL Password
    $DB_DBName = ""; //your MySQL Database Name
    $DB_TBLName = ""; //your MySQL Table Name

  5. #5
    alen123 is offline Banned
    Join Date
    Sep 2011
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Feedback Score
    0

    Default

    <?php
    $con = mysql_connect("localhost","peter","abc123");
    if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }

    if (mysql_query("CREATE DATABASE my_db",$con))
    {
    echo "Database created";
    }
    else
    {
    echo "Error creating database: " . mysql_error();
    }

    mysql_close($con);
    ?>

Similar Threads

  1. How to Get Table List - MS SQL
    By manik in forum Databases
    Replies: 8
    Last Post: 04-13-2012, 05:37 AM
  2. Hash table
    By jacismeth in forum Computer and Tech
    Replies: 4
    Last Post: 11-01-2011, 09:05 AM
  3. How To Create a Table in php?
    By Zubairjani in forum PHP
    Replies: 2
    Last Post: 07-20-2011, 12:07 PM
  4. how do the copy one table to another table??
    By ursimrankhanna in forum Databases
    Replies: 3
    Last Post: 12-10-2010, 01:24 AM
  5. Why using table is bad
    By mastermind in forum HTML / DHTML
    Replies: 3
    Last Post: 12-11-2009, 03:52 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Partners: BOSTON WEB DEVELOPER, LLC   |   WEBCOSMO CLASSIFIEDS