5

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

2
  • Need a little more information - you can use regular SQL queries with Zend_Db, or build the query using Zend_Db_Select Commented Apr 14, 2012 at 23:54
  • 2
    I think your premiss is flawed. Zf generates SQL queries from php code. There is no special Zend FrameWork equivalent Query. You actually have multiple options on how you want to build your queries in ZF. If you really want to work in SQL, execute your SQL queries with Zend_Db_Statement and enjoy. Commented Apr 15, 2012 at 6:19

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

i know i can use mysql query,u know the difference b/w syntax of genral mysql query and zf query.zf query syntax is bit difficult so i need to convert mysql query to zf equailent query
The SQL string is identical if you use $db->query(). If you want to use the Zend_Db_Select object, then that is a different matter and you should post a separate question with an explicit SQL statement that you are trying to convert to Zend_Db_Select.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.