Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include ("conn.php");
- $sqlsavestok=mysqli_query($conn,"select count(*) as total from budidaya");
- if($sqlsavestok)
- {
- echo "OK";
- $tgl2 = date('Y-m-d', strtotime('+1 days', strtotime($tanggalmasuk)));
- $query="select * from logbarang where
- nmbarang like '$inventori' and
- date(tanggal) between '$tgl2' and '2017-08-31'
- order by tanggal asc";
- $sqlulang=mysqli_query($conn,$query)or die (mysqli_error($conn));
- /* bila error di atas.. tidak akan lanjut */
- echo "<hr>query<br/>$query<hr> ";
- {
- while($dataloop=mysqli_fetch_array($sqlulang))
- {
- echo $dataloop['tanggal']." ".$dataloop['nmbarang']." ".$dataloop['stok']."<br>";
- }
- }
- }
- else
- {
- echo "ERROR";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement