I'm starting to use PDO in my projects in PHP. When I worked with mysql, without PDO, when I got a query in DB, I was able to get every data associated with a variable and could do what I wanted with it. Now using PDO, how can I do this data manipulation?
For example: I did this ..
$contas_entrada = mysql_query("SELECT valor FROM entrada WHERE id_empresa='$id_empresa' ORDER BY data DESC");
while($entrada_row = mysql_fetch_array($contas_entrada)){
$valor = $entrada_row['valor'];
}
So I could work on the variable $ value to tweak it. How can I get data, via PDO, to manipulate them?