Questions tagged as 'delete'

1
answer

Delete in an UPDATE trigger

How can I delete a record being inserted into a specific condition in a trigger? example: USE 'scompraslenovo'; DELIMITER $$ CREATE TRIGGER 'precad_fornecedor_BUPD' BEFORE UPDATE ON 'precad_fornecedor' FOR EACH ROW BEGIN IF (new.f1 IS N...
asked by 17.12.2014 / 16:54
2
answers

Delete multiple rows using checkbox in php and mysql

I want to delete the rows that I select with my checkbox and also delete the database so that pq is given in this part of the code: <?php include "conexao.php"; if (isset($_POST['sel'])) { foreach ($_POST['sel'] as $id) { $sql...
asked by 27.08.2017 / 18:53
2
answers

Mysql problems with DELETE

I am failing mysql by recognizing the delete function $code = '1234'; $conn = new PDO('mysql:host=localhost;dbname=data', 'root'); $stmt = $conn->prepare('SELECT * FROM codes WHERE code='.$code.''); $stmt->execute(); $result = $st...
asked by 14.07.2017 / 21:46