[1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1] in EXECUTE("INSERT INTO mailer_recipients (status,send_result_id) VALUES (,)")
public function saveData($status, $resultId)
{
global $dbwriter;
// Update send result, send result ID, status
$sql = 'UPDATE ' . $this->recipientDbTable . ' SET ' . $this->recipientDbColumn['status'] . "='$status' WHERE " . $this->recipientDbColumn['id'] . '=' . $this->getId();
$sql = 'UPDATE ' . $this->recipientDbTable . ' SET ' . $this->recipientDbColumn['result_id'] . "='$resultId' WHERE " . $this->recipientDbColumn['id'] . '=' . $this->getId();
$sql = 'INSERT INTO ' . $this->recipientDbTable;
$sql .= ' (' . $this->recipientDbColumn['status'] . ',' . $this->recipientDbColumn['result_id'] . ')';
$sql .= ' VALUES ' . '(' . $status . ',' . $resultId . ')';
$result = $dbwriter->execute($sql);
}
UPDATE - это нормально. Не могу понять, в чем проблема.(PHP) (SQL) Что не так с синтаксисом INSERT INTO?
Не downvote mayyyyyyyyyLMAO – Spidey
Обратите внимание, что вы, кажется, не выполняете ваши инструкции 'UPDATE' вообще, просто строя их SQL и затем сразу же перезаписывая его. –
Lol whoops haha, thanks bro – Spidey