开发者

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.


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

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜