Search code examples
zend-frameworkzend-db

Zend Framework: Show table status query


How I can write this query in zend:

$tableStatus = mysql_query("SHOW TABLE STATUS LIKE 'table_Name'");

Because I need to get next auto increment number.


Solution

  • What about?

    $stmt = $dbAdapter->query("SHOW TABLE STATUS LIKE 'table_name';");
    $tableStatus = $stmt->fetchObject();