<?php
include("db.php");
$result1 = mysql_query("SELECT DATE_FORMAT(CURDATE(), '%Y-%c-%d %H:%i') ");
$row=mysql_fetch_array($result1);
$from=$row['0'];
echo $from;
echo "<br>";
$result2 = mysql_query("SELECT DATE_FORMAT(CURDATE() - INTERVAL 2 DAY , '%Y-%c-%d %H:%i')");
$row1=mysql_fetch_array($result2);
$to=$row1['0'];
echo $row1['0'];
$result3 = mysql_query("SELECT * from pr where date between '$to' and '$from' ");
$row3=mysql_fetch_array($result3);
//$to=$row3['0'];
echo $row3['0'];
echo $row3['1'];
?>
pranay.baba 0 Newbie Poster
AARTI SHRIVAS 2 Posting Pro in Training
pritaeas 2,194 ¯\_(ツ)_/¯ Moderator Featured Poster
pranay.baba 0 Newbie Poster
diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.