Please Suggest me how to write this using zend db
$userId = $_GET ['user_id'];
$statsFalg = $_GET['stats_flag'];
$query = UPDATE users SET stats_flag='".$statsFlag."' WHERE user_id='".$userId."';
Actually I’m sending an request through Ajax when the user checked box or unchecked a box
Do something like this in the update function of your model:
Where
getDbTable()returns an instance ofZend_Db_Table_Abstract: