query("SELECT f.*, m.userid, m.email FROM foo AS f LEFT JOIN members AS m WHERE ??? ORDER BY m.userid ASC GROUP BY m.userid LIMIT 10, 100"); $db ->select(array('f' => '*', 'm' => array('userid', 'email'))) ->from(array(TABLE_PREFIX . 'foo' => 'f')) ->join('left', 'members', 'm') ->where(array( )) ->orderBy('userid', 'asc', 'm') ->groupBy('userid', 'm') ->limit(10, 100); // $db->query("SELECT * FROM users WHERE userid = 4"); $simple = $db->select('*')->from('users')->where(array('userid' => 4)); // $db->query("INSERT INTO posts (userid, email) VALUES (4, 'robert@sesek.com')"); $insert = $db->insert(TABLE_PREFIX . 'posts', array( 'userid' => 4, 'email' => 'robert@sesek.com' )); ?>