вот форма в которой выбираеться да-нет
[CODE] print '<tr><td>'.$langs->trans("Sched_Post").'</td>';
print '<td>'.$form->selectyesno('scheduling_post',(isset($_POST["scheduling_post"])?$_POST["scheduling_post"]:$object->scheduling_post), 1).'</td>';
print '<td>'.$langs->trans("Sched_Notice_Post").'</td>';
print '<td>'.$form->selectyesno('scheduling_notice_post',(isset($_POST["scheduling_notice_post"])?$_POST["scheduling_notice_post"]:$object->scheduling_notice_post), 1).'</td></tr>';
print '<tr><td>'.$langs->trans("Sched_Fax").'</td>';
print '<td>'.$form->selectyesno('scheduling_fax',(isset($_POST["schduling_fax"])?$_POST["scheduling_fax"]:$object->scheduling_fax), 1).'</td>';
print '<td>'.$langs->trans("Sched_Notice_Fax").'</td>';
print '<td>'.$form->selectyesno('scheduling_notice_fax',(isset($_POST["scheduling_notice_fax"])?$_POST["scheduling_notice_fax"]:$object->scheduling_notice_fax), 1).'</td></tr>';
print '<tr><td>'.$langs->trans("Sched_Email").'</td>';
print '<td>'.$form->selectyesno('scheduling_email',(isset($_POST["scheduling_email"])?$_POST["scheduling_email"]:$object->scheduling_email), 1).'</td>';
print '<td>'.$langs->trans("Sched_Notice_Extend").'</td>';
print '<td>'.$form->selectyesno('scheduling_notice_extend',(isset($_POST["scheduling_notice_extend"])?$_POST["scheduling_notice_extend"]:$object->scheduling_notice_extend), 1).'</td></tr>';
print '<tr><td>'.$langs->trans("Sched_Phone").'</td>';
print '<td>'.$form->selectyesno('scheduling_phone',(isset($_POST["scheduling_phone"])?$_POST["scheduling_phone"]:$object->scheduling_phone), 1).'</td>';
print '<td>'.$langs->trans("Sched_Notice_E-Mail").'</td>';
print '<td>'.$form->selectyesno('scheduling_notice_email',(isset($_POST["scheduling_notice_email"])?$_POST["scheduling_notice_email"]:$object->scheduling_notice_email), 1).'</td></tr>';[/CODE]
sql-update:
[CODE]$sql .= ", scheduling_post=".($this->scheduling_post?"'".$this->scheduling_post."'":"1");
$sql .= ", scheduling_email=".($this->scheduling_email?"'".$this->scheduling_email."'":"1");
$sql .= ", scheduling_phone=".($this->scheduling_phone?"'".$this->scheduling_phone."'":"1");
$sql .= ", scheduling_fax=".($this->scheduling_fax?"'".$this->scheduling_fax."'":"1");
$sql .= ", scheduling_notice_fax=".($this->scheduling_notice_fax?"'".$this->scheduling_notice_fax."'":"1");
$sql .= ", scheduling_notice_extend=".($this->scheduling_notice_extend?"'".$this->scheduling_notice_extend."'":"1");
$sql .= ", scheduling_notice_post=".($this->scheduling_notice_post?"'".$this->scheduling_notice_post."'":"1");
$sql .= ", scheduling_notice_email=".($this->scheduling_notice_email?"'".$this->scheduling_notice_email."'":"1");[/CODE]
и вот ошибка:
[CODE]sql=UPDATE rr_socpeople SET scheduling_post='.(1 > 0?1:1); 1=1', scheduling_email='1', scheduling_phone='.(1 > 0?1:this->scheduling_phone); 1=1', scheduling_fax='1', scheduling_notice_fax='.(1 > 0?1:1); 1=1', scheduling_notice_extend='1', scheduling_notice_post='.(1 > 0?1:1); 1=1', scheduling_notice_email='1' WHERE rowid=25967[/CODE]
Примечание:
Так куда правильнее ещё, я не вижу там ошибки, вот он поностью, просто я сюда не всё вставлял:
$sql = "UPDATE ".MAIN_DB_PREFIX."socpeople SET ";
$sql .= ", scheduling_post=".($this->scheduling_post?"'".$this->scheduling_post."'":"null");
$sql .= ", scheduling_email=".($this->scheduling_email?"'".$this->scheduling_email."'":"null");
$sql .= ", scheduling_phone=".($this->scheduling_phone?"'".$this->scheduling_phone."'":"null");
$sql .= ", scheduling_fax=".($this->scheduling_fax?"'".$this->scheduling_fax."'":"null");
$sql .= ", scheduling_notice_fax=".($this->scheduling_notice_fax?"'".$this->scheduling_notice_fax."'":"null");
$sql .= ", scheduling_notice_extend=".($this->scheduling_notice_extend?"'".$this->scheduling_notice_extend."'":"null");
$sql .= ", scheduling_notice_post=".($this->scheduling_notice_post?"'".$this->scheduling_notice_post."'":"null");
$sql .= ", scheduling_notice_email=".($this->scheduling_notice_email?"'".$this->scheduling_notice_email."'":"null");
$sql .= " WHERE rowid=".$id;
Примечание:
Вот ссылка на
http://pastebin.com/4t2U5qS7
там и дополнил описание ошибки
Примечание:
Всё что можно уже проверил, но не проходит запись в БД, в чём может быть ошибка, гляньте пожалйста, а то сам не разберусь никак
http://pastebin.com/CRjtmxeA