root

Changeset 768

Show
Ignore:
Timestamp:
03/14/10 18:14:21 (6 months ago)
Author:
wbond
Message:

Fixed #382 - fSchema no longer chokes when a MySQL database includes views

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • fSchema.php

    r746 r768 Hide Line Numbers
    1010 * @link       http://flourishlib.com/fSchema 
    1111 *  
    12  * @version    1.0.0b31 
     12 * @version    1.0.0b32 
     13 * @changes    1.0.0b32  Fixed ::getTables() to not include views for MySQL [wb, 2010-03-14] 
    1314 * @changes    1.0.0b31  Fixed the creation of the default caching key for ::enableCaching() [wb, 2010-03-02] 
    1415 * @changes    1.0.0b30  Fixed the class to work with lower privilege Oracle accounts and added detection of Oracle number columns [wb, 2010-01-25] 
     
    20152016             
    20162017            case 'mysql': 
    2017                 $sql = 'SHOW TABLES'; 
     2018                $version = $this->database->query("SELECT version()")->fetchScalar(); 
     2019                $version = substr($version, 0, strpos($version, '.')); 
     2020                if ($version <= 4) { 
     2021                    $sql = 'SHOW TABLES'; 
     2022                } else { 
     2023                    $sql = "SHOW FULL TABLES WHERE table_type = 'BASE TABLE'";   
     2024                } 
    20182025                break; 
    20192026