Jump to content

date problem to display the data..


zura08

Recommended Posts

<?php

$CURDATE = date("yyyy-mm-dd");

 

$date = date("yyyy-mm-dd",strtotime("+ 1 month"));

$conn=mysql_connect("localhost","root","") or die("TIDAK boleh buat SAMBUNGAN ke MySQL!");

$db=mysql_select_db("zns_inventori",$conn);

$sql = "SELECT Kod_siri,Nama_item,Tarikh_luput,Kuantiti FROM stok where DATE_SUB(CURDATE(),INTERVAL 30 DAY) >= Tarikh_luput order by Kod_siri" ;

 

$rs = mysql_query($sql, $conn);

$bil_rekod = mysql_num_rows($rs);

if ($bil_rekod <= 0)

{

 

echo "<center><b>Tiada produk yang menghampiri tarikh luput bulan ini.<b></center>";

//header("location:welcomes.php");

exit();

}

else

 

?>

 

 

can i do with this sql??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.