Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $db = \Db::getInstance();
- // query returns statement
- $stmt = $db->createCommand()->select()->from(array('m' => 'managers'))
- ->where('man_id = :man_id')->query(array('man_id' => 1));
- var_dump($db->fetch_assoc($stmt));
- $db = \DbFactory::getConnection('crm_extended');
- // here we build select object
- $select = $db->createCommand()->select()->from('error_log')->limit(1);
- // we can print it anytime
- echo $select;
- var_dump($db->q_assoc_one($select));
Advertisement
Add Comment
Please, Sign In to add comment