I have unidentified index errors, and sometimes i need it to really be blank.
for example this one. I need this one to be blank because there is already an else statement.
the $_GET is only when the user inputs a date.
$datefrom   = $_GET['datefrom'];
$dateto     = $_GET['dateto'];
if(isset($_GET['datefrom']) && ($_GET['dateto'])){
    $qry = "SELECT sum(order_detail.quantity*order_detail.price) as chenes, orders.date 
        FROM order_detail 
        LEFT JOIN orders 
        ON order_detail.orderid=orders.serial
        WHERE date(orders.date) BETWEEN '$datefrom' AND '$dateto'";
}
else {
    $qry = "SELECT sum(order_detail.quantity*order_detail.price) as chenes, orders.date 
        FROM order_detail 
        LEFT JOIN orders 
        ON order_detail.orderid=orders.serial";
}
how do i ignore the unidentified index error or remove it even if there is a blank? Thank you.
 
     
     
    