1
To make bank operations and better use(or which to use): Data manipulation
To work with data manipulation ?
and how I would do to make bank operations will go with it 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 initiating the dbal Doctrine package, I’m reading the documentation,
for example in PDO I make the call from $pdo->bindValues
as in the example above,
in the Doctrine package as I would do these parameters ?
I use Query-Builder if it does not answer ... I end up using DRM or Data Manipulation
– Otto
I did not understand what your doubt, you want to know how to run these queries with Dbal Doctrine ?
– Fábio Lemos Elizandro
exactly. I gave the above example using PDO, how do I run with Doctrine ? I saw in the documentation but could not understand right.
– JB_