Advertisement
Guest User

Cek Variable

a guest
Sep 21st, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. include ("conn.php");
  2. $sqlsavestok=mysqli_query($conn,"select * from budidaya");
  3. if($sqlsavestok)
  4. {
  5. echo "OK";
  6. $tgl2 = date('Y-m-d', strtotime('+1 days', strtotime($tanggalmasuk)));
  7.  
  8. $sqlulang=mysqli_query($conn,"select * from logbarang where nmbarang='$inventori' and (tanggal between '$tgl2' and '2017-08-31') order by tanggal asc")or die (mysqli_error($conn));
  9.  
  10. if(mysqli_num_rows($sqlulang)>0)
  11. {
  12. while($dataloop=mysqli_fetch_array($sqlulang))
  13. {
  14. echo $dataloop['tanggal']." ".$dataloop['nmbarang']." ".$dataloop['stok']."<br>";
  15. }
  16. }
  17. else
  18. {
  19. echo "Errorx";
  20. }
  21. }
  22. else
  23. {
  24. echo "ERROR";
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement