Login +

Documentation

SLS_Sql::showColumns

Since SillySmart 1.0

Description

Return all the columns of one table
public array showColumns ( string $table);

Parameters

  • string $table
    the table name

Return

array $columns
array of PDO objects

Exemples

  •  var_dump(SLS_Sql::getInstance()->showColumns("table"));
     // will produce :
     array(
    0 => object(stdClass){
    "Field"=> "table_id",
    "Type"=> "bigint(20)",
    "Collation"=> NULL,
    "Null"=> "NO",
    "Key"=> "PRI",
    "Default"=> NULL,
    "Extra"=> "auto_increment",
    "Privileges"=> "select,insert,update,references",
    "Comment"=> "Id"
     },
     1 => ...
     )

Comments

No comment on this function, be the first !

Add your comment

You must login/register to post a reply.