DB::tableList PHP Method

tableList() public static method

public static tableList ( )
    public static function tableList()
    {
        $args = func_get_args();
        return call_user_func_array(array(DB::getMDB(), 'tableList'), $args);
    }

Usage Example

 /**
  * Update the database schema as required by this extension
  */
 function augmentDatabase()
 {
     $exist = DB::tableList();
     if (!empty($exist) && array_search('ForumMember', $exist) !== false) {
         DB::query("UPDATE \"Member\", \"ForumMember\" " . "SET \"Member\".\"ClassName\" = 'Member'," . "\"Member\".\"ForumRank\" = \"ForumMember\".\"ForumRank\"," . "\"Member\".\"Occupation\" = \"ForumMember\".\"Occupation\"," . "\"Member\".\"Country\" = \"ForumMember\".\"Country\"," . "\"Member\".\"Nickname\" = \"ForumMember\".\"Nickname\"," . "\"Member\".\"FirstNamePublic\" = \"ForumMember\".\"FirstNamePublic\"," . "\"Member\".\"SurnamePublic\" = \"ForumMember\".\"SurnamePublic\"," . "\"Member\".\"OccupationPublic\" = \"ForumMember\".\"OccupationPublic\"," . "\"Member\".\"CountryPublic\" = \"ForumMember\".\"CountryPublic\"," . "\"Member\".\"EmailPublic\" = \"ForumMember\".\"EmailPublic\"," . "\"Member\".\"AvatarID\" = \"ForumMember\".\"AvatarID\"," . "\"Member\".\"LastViewed\" = \"ForumMember\".\"LastViewed\"" . "WHERE \"Member\".\"ID\" = \"ForumMember\".\"ID\"");
         echo "<div style=\"padding:5px; color:white; background-color:blue;\">" . _t('ForumRole.TRANSFERSUCCEEDED', 'The data transfer has succeeded. However, to complete it, you must delete the ForumMember table. To do this, execute the query \\"DROP TABLE \'ForumMember\'\\".') . "</div>";
     }
 }
All Usage Examples Of DB::tableList