0
How to make that in return fetch(PDO::FETCH_ASSOC)
he adds the columns p_line_a (height) and p_line_l (width) referring to a specific date.
For example: A person who sees the sum of the integers of these two columns referring to the day 2016-09-20. How to make this script? (PDO)
In case it should return the sum of 25.5...
The general return, however not summed and tbm separate...
$bsc_user = $pdo->prepare("SELECT * FROM `tab_newprodut` WHERE `p_data`=?");
$bsc_user->execute(array("2016-09-20"));
$bsc_cont = $bsc_user->rowCount();
if($bsc_cont > 0){
while($linha = $bsc_user->fetch(PDO::FETCH_ASSOC)) {
echo $linha['p_line_a'].' '.$linha['p_line_l'].'<br>';
}
} else {
echo '<div class="return_box-list-u">Nenhum registro localizado.</div>';
}
1- it needs to sum the two columns p_line_a, p_line_l that refer to the specified date.
2- how would I print (echo) this??
Like this yours
query
on the PDO?– Guilherme Lautert
$bsc_line = $Pdo->prepare("SELECT * FROM
tab_newprodut
WHEREp_data
= ?");– Pedro Quezado