php pdo insert не работает - update mysql пример
Primary tabs
да наблюдается явление с таким кот кодом:
$stmt = $DBCh->dbc->prepare("INSERT INTO `shop_items2` (description) VALUES (:description) WHERE id = :id");
$stmt->bindParam(':id', $id);
$stmt->bindParam(':description', $description);
$description = $desc;
$id = $val[0];
$stmt->execute(); // не обнавляет строку - т.е. не работает!
echo ('обновлено - из '. $val[1] . ' выделено: ' . $desc . ' для id === '.$id.'<br>');
;проблемы в том что просто неправильно написан update-запрос - здесь нужен именно он:
$stmt = $DBCh->dbc->prepare("UPDATE `shop_items` SET description = :description WHERE id = :id");- vedro-compota's blog
- Log in to post comments
- 5878 reads