Tuesday, 28 August 2018
Subscribe to:
Post Comments (Atom)
$time = round(microtime(true)*1000);
<?php
include 'connect.php';
$timestamp = "";
$return = array();
$response = "";
$sql = "SELECT * FROM receipts ORDER BY timestamp DESC LIMIT 1";
$result1 = mysqli_query($db, $sql);
if($details = mysqli_fetch_array($result1)){
$timestamp = $details['timestamp'];
}
$sql = "SELECT * FROM sales WHERE timestamp>'$timestamp' ORDER BY date ASC";
$result = mysqli_query($db, $sql);
echo "<table class=table1>";
while($fetch_options=mysqli_fetch_array($result)){
$memo=$fetch_options['memo'];
$product=$fetch_options['pid'];
$qty=$fetch_options['qty'];
$amount=$fetch_options['amt'];
echo "<tr>";
echo "<td align=center>$memo</td>
<td align=center>$product</td>
<td align=center>$qty</td>
<td align=center>$amount</td>";
echo "</tr>";
}
echo "</table>";
?>
time()
instead of microtime()
time()
will return the time in seconds as an INT. microtime()
will give you time in microseconds as STRING or as FLOAT by using true as a first parameter => microtime(true)
microtime()
by 1000. That will give you the same as time()
.time()
instead of round(microtime()*1000)
.Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment