dostaje taki błąd
Incorrect integer value: '' for column `grobnet_01`.`wyszukiwarka_posts`.`post_comments`
chodź w bazie mam ustawione TINYINT(1) bo w tej tabeli będę zapisywał 1 lub 0 zawsze mi działało teraz mi działać nie chce co to może być

echo"<input type='checkbox' name='post_comments' value='yes' onclick='SetRatings();'".$post_comments." />";
echo"<input type='checkbox' name='post_comments' value='yes' onclick='SetRatings();'".$post_comments." />";
function form_checkbox_switch_succes($input_name, $label = '',$wyniki_wyświetlanie ='', array $options = []){ $default_options = [ 'type' =>'checkbox', 'input_id' => $input_name, 'required' => FALSE, 'onclick_id' =>'', 'option' => [], 'class' => '', 'id' => '', ]; $options += $default_options; $disabled=''; $opt= ''; foreach($options['option'] as $key => $name){ $chackbox ="<div class='form-group'>"; $chackbox .="<div class='icheck-success d-inline'>"; $chackbox .="<input type='".$options['type']."' name='".$input_name."' value='".$key."' ".$disabled." class='".$options['class']."' id='".$options['id']."' ".($options['onclick_id'] ? " onclick='".$options['onclick_id']."' " : '')." ".($wyniki_wyświetlanie ? " checked='checked' " : '').">"; $chackbox .="<label for='".$options['id']."'>".$name."</label>"; $chackbox .="</div>"; $chackbox .="</div>"; } return $checkbox; }
['option' => ['yes' => $locale['516']],'id' => 'checkbox'.$locale['516']]);
$chackbox .="<input type='".$options['type']."' name='".$input_name."' value='".$key."' ".$disabled." class='".$options['class']."' id='".$options['id']."' ".($options['onclick_id'] ? " onclick='".$options['onclick_id']."' " : '')." ".($wyniki_wyświetlanie ? " checked='checked' " : '').">";
$chackbox .="<input type='".$options['type']."' name='".$input_name."' value='".$key."' ".$disabled." class='".$options['class']."' id='".$options['id']."' ".($options['onclick_id'] ? " onclick='".$options['onclick_id']."' " : '')." ".($wyniki_wyświetlanie ? " checked='checked' " : '')."> To jest $key=>".$key;
["post_type"]=>string(5) "posts" ["post_category"]=>string(1) "1" ["post_comments"]=>string(1) "0" ["minaturs"]=>string(41) "" ["minaturs_t1"]=>string(44) "" ["minaturs_t2"]=>string(44) ""
function form_checkbox_switch_succes($input_name, $label = '',$wyniki_wyświetlanie ='', array $options = []){ $default_options = [ 'type' =>'checkbox', 'input_id' => $input_name, 'required' => FALSE, 'onclick_id' =>'', 'option' => [], 'class' => '', 'id' => '', ]; $options += $default_options; $disabled=''; $opt= ''; foreach($options['option'] as $key => $name){ $key = 0; else $key = 1; $chackbox ="<div class='form-group'>"; $chackbox .="<div class='icheck-success d-inline'>"; $chackbox .="<input type='".$options['type']."' name='".$input_name."' value='".$key."' ".$disabled." class='".$options['class']."' id='".$options['id']."' ".($options['onclick_id'] ? " onclick='".$options['onclick_id']."' " : '')." ".($wyniki_wyświetlanie ? " checked='checked' " : '').">"; $chackbox .="<label for='".$options['id']."'>".$name."</label>"; $chackbox .="</div>"; $chackbox .="</div>"; } return $checkbox; }
$fields[] = "`$key`"; $values[] = "'" . mysqlirealescapestring($data[$key]) . "'"; } } $sql = "INSERT INTO `$table` ($fields) VALUES ($values)"; return dbquery($sql); }
string(260) "INSERT INTO `wyszukiwarka_posts` (`post_author`,`post_date`,`post_title`,`post_visibility`,`page_content`,`po
st_type`,`post_category`,`post_comments`,`minaturs`,`minaturs_t1`,`minaturs_t2`) VALUES ('1','1672944686','Test zapisu','1','','posts','1','','','','')"
string(1) "0" ( [post_author] => 1 [post_date] => 1672945212 [post_title] => Test zapisu [post_visibility] => 1 [page_content] => [post_type] => posts [post_category] => 0 [post_comments] => 0 [minaturs] => [minaturs_t1] => [minaturs_t2] => )