table exists in php MySql

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • soldier.coder

    table exists in php MySql

    I have 2 requirements that I don't know how to implement in php using
    MySql.

    1) I want to see if a particular table name exists.

    2) I want an arrays with the column names that exist in a table.

    can anyone help me out with that please?

    Thanks
  • NC

    #2
    Re: table exists in php MySql

    On Jul 17, 9:24 am, "soldier.co der" <geekprogrammer ...@googlemail. com>
    wrote:
    >
    I have 2 requirements that I don't know how to implement
    in php using MySql.
    >
    1) I want to see if a particular table name exists.
    Run a SHOW TABLES query; it will return a list of tables that exist in
    the currently selected database. See MySQL documentation:


    2) I want an arrays with the column names that exist in a table.
    Run a SHOW COLUMNS query; it will return a list of fields that exist
    in the specified table. See MySQL documentation:



    Cheers,
    NC

    Comment

    • Barry

      #3
      Re: table exists in php MySql


      "soldier.co der" <geekprogrammer .ed@googlemail. comwrote in message
      news:48ff1c11-164e-4e97-84fa-524018421f96@r6 6g2000hsg.googl egroups.com...
      >I have 2 requirements that I don't know how to implement in php using
      MySql.
      >
      1) I want to see if a particular table name exists.
      >
      2) I want an arrays with the column names that exist in a table.
      >
      can anyone help me out with that please?
      rtfm.

      both these questions are answered in the mysql manual and are well
      documented - not hidden.


      Comment

      Working...