Example #1
0
    echo $r['email_user'];
    echo "<br>";
}
echo "Total Rows : ", $db->NumRows();
echo "<br>";
/*
* Update records
*/
$post = array('email_user' => '*****@*****.**');
$db->update('users', $post, 'id = 1');
echo "Affected Rows : ", $db->affected;
echo "<br>";
/*
* Get total rows count
*/
echo "Total Rows : ", $db->Count('users', 'user_type = "s"');
echo "<br>";
/*
* Row count with group by
*/
$db->group_by = 'email_user';
echo "Total Rows Group by : ", $db->Count('users');
/*
* With where condition as array concate with AND
*/
$whr = array('AND' => array('id' => '1', 'user_type' => 's'));
$db->select('users', '*', $whr);
$r = $db->fetch();
print_r($r);
/*
* With where condition as array concate with AND