Is there any Online Web Tool that Convert mySQL Query To Zend FrameWork Query. that is i type mySql Query and the Tool Convert it to Zend FrameWork equivalent Query
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You don't need a tool for this. Within Zend Framework's Zend_Db, component, you can do:
$stmt = $db->query($sql);
If $sql
is a select, then you can retrieve the data with:
$rows = $stmt->fetchAll();
Alternatively, ZF is just a PHP framework, so there's nothing stopping you continuing to use PDO
or mysqli
directly.