To make bank operations better and to use (or which to use): Data Manipulation
To work with data manipulation?
And how would I do it to do bank operations with him for example:
#inserção no banco
$sql = INSERT INTO tcorrida(nome_tCorrida, classificacao_tCorrida, ref_tCorrida, meta_tCorrida) VALUES ('?, ?, ?, ?');
$pdo->bindValue(1, $nome_tCorrida); //variavel que vem do formulario
$pdo->bindValue(2, $classificacao_tCorrida);
$pdo->bindValue(3, $ref_tCorrida);
$pdo->bindValue(4, $meta_tCorrida);
$pdo->execute();
#Atualização no banco
UPDATE tcorrida SET nome_tCorrida='?',classificacao_tCorrida='?', ref_tCorrida='?',meta_tCorrida='?' WHERE id_tCorrida='?';
$pdo->bindValue(1, $nome_tCorrida); //variavel que vem do formulario
$pdo->bindValue(2, $classificacao_tCorrida);
$pdo->bindValue(3, $ref_tCorrida);
$pdo->bindValue(4, $meta_tCorrida);
$pdo->execute();
#Seleção de dados do banco
SELECT * FROM tcorrida WHERE id_tCorrida='?';
$pdo->bindValue(1, $id_tCorrida);
$pdo->execute();
#Deletar dados do banco
DELETE FROM tcorrida WHERE id_tCorrida='?';
$pdo->bindValue(1, $id_tCorrida);
$pdo->execute();
I'm starting in the doctrine dbal package, I'm reading the documentation,
for example in the PDO I make the $pdo->bindValues
call as in the example above,
in the doctrine package how would I do these parameters?