ahhh, thanks!
Now I wonder how this would/could apply to modx?
// Select multiple records from the database and print them out.. $users = $db->get_results("SELECT name, email FROM users"); foreach ( $users as $user ) { // Access data using object syntax echo $user->name; echo $user->email; }
foreach ( $db->get_col("SELECT name,email FROM users",0) as $name ) { echo $name; }
// Get one variable from the database and print it out.. $var = $db->get_var("SELECT count(*) FROM users"); echo $var;