I have a code in php as:
$result = mysql_query($cxn,$sql_query)
$dataset= mysqli_fetch_fields($result);
for ($i = 0; $i < 13; $i++) {
$dataset[$i]->name
}
I want the above code in zend.
Here mysql_fetch_fields($result) returns the information about fields from the given result set $result.How to do it in zend framework?I have googled it , I found that we can retrieve the information about colums from a particular table but from a result set how to retrieve in zend framework??
It’s currently not possible in Zend Framework. Look at Request solution for result set metadata. You can try to use experimental PDOStatement::getColumnMeta
UPDATE – example for code in comments
More about running “other” database statements