maniclorn
maniclorn

Reputation: 1089

MySql SHOW query in ZEND

In zend it is written like

$table = $this->getTable();
        $select = $table->select()->where('status = ?',1)
                                ->where('columnOne= ?', 1) 
                                ->order('columnTwo')
                                ->limit(1);

similar to where, order, limit conditions how can I condition for LIKE?

My query is

SHOW TABLE STATUS LIKE 'tableName'

I tried in this way

    $table = $this->getTable();
                $query= $table->select("TABLE STATUS")
                                ->like($table);
    $id = mysql_query($query);

then I found that no method for LIKE is available in ZEND. Then How can I write above query in Zend framerk?

Thanks in advance.

Upvotes: 2

Views: 1527

Answers (1)

ChrisA
ChrisA

Reputation: 2101

This works for me, so hopefully it should give you what you want:

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

Upvotes: 7

Related Questions