2
include "conexao.inc";
$sql="SELECT * FROM tb_abastece WHERE data BETWEEN ('20/01/2019') AND ('30/01/2019')";
$res=mysqli_query($conexao,$sql);
while($vreg=mysqli_fetch_array($res))
{
$id=$vreg[0];
$ida=$vreg[1];
$postoa=$vreg[2];
$insumoa=$vreg[3];
$valora=$vreg[4];
$kmlta=$vreg[5];
$dataa=$vreg[6];
$ltsa=$vreg[7];
$destinoa=$vreg[8];
$odometroa=$vreg[9];
$kma=$vreg[10];
}
<div>
echo $id." / ".$postoa." // ".$kmlta." // ".$destinoa;
</div>
I want the column total ltsa
between an initial date and a final date.
I got the break, but I don’t know how to add.
I appreciate any help.
Looking at it like this, it seems to me that 02/25/2014 will be between there, at least it seems to be string format. Dates on my as far as I know (I didn’t use 8) are yyyy-mm-dd, no?
– Bacco
@Bacco Arrumado.
– Victor Stafusa
There is still hope for Anna’s column to be in date format too, otherwise it will still be a problem, even with the conversions (but only with an edition in the question by the person who posted it).
– Bacco
Thanks, it worked out
– user134594