ez.no / exponential / documentation / development / libraries / ez db / data retrieval
These documentation pages are no longer maintained. Please visit the new documentation site.
To fetch data from the database you can use the arrayQuery function. This function takes an SQL command as a parameter. An array of associative arrays is returned.
// fetch some data into an array of associative arrays $rows =& $db->arrayQuery( "SELECT * FROM sql_test" ); foreach ( $rows as $row ) { print( $row["name"] ); }
log in or create a user account to comment.
Comments
Query not working!!
Claus Jensen
Monday 15 December 2003 9:14:54 am
//get db-connection
$db =& eZDB::instance();
...
//this is the line its refering to, line 84
$rows = $db->arrayQuery( "SELECT * FROM ezcontentobject_tree WHERE parentnode_id = $parentnodeid" );
...etc
and the output when I run it is:
Fatal error: Call to a member function on a non-object in /data/exponential/3.2-1/met_imp_final.php on line 84<br />
Fatal error: Exponential did not finish it's request
The execution of Exponential was abruptly ended.
Whats wrong?!?
claÜs