When I try to update my table with the value="" fields from my form the query fails and returns false, but I can't receive an error from it telling me what's wrong in any way.
$input = Input::get("textfield");
$option = Input::get("optionfield");
if($option == 0)
{
$option = null;
}
if(empty($input))
{
$input = null;
}
$update = MyTable::where("id", "=", 1)->update(["input" => $input, "option" => $option]);
If I change the value by typing something in the input field then it updates.
How come?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire