invalid input syntax for type timestamp:

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sruthyus
    New Member
    • Feb 2014
    • 1

    invalid input syntax for type timestamp:

    php code

    Code:
    $from=$_GET['from'];
    $to=$_GET['to'];
    $query1="select ci.contact_id,w.name as depot from user_account u join wholesale_depot_id w on w.contact_id=u.contact_id where u.user_name='$uname'";
    	$result1=db_query($query1);
    	$row1=db_fetch_array($result1);
    	$depot_id=$row1['contact_id'];
    	
    $sl=0;
    echo $query2="select mi.medicine_id,mi.batch,mi.expiry_date,mi.purchase_date,mi.quantity_received,mm.name as product,c.name as company from medicine_item mi left join medsoft_medicine mm on mm.id=mi.medicine_id left join company c on c.id=mm.company_id where mi.expiry_date between '$from' and '$to' and mi.wholesale_depot_id='$depot_id'";
    
    design code
    
    <td height="17">From date</td> <td><input type="text" name="from" id="from" class="tcal" size="22" /></td> <td>**To Date</td> <td><input type="text" name="to" id="to" class="tcal" /></td>
    Last edited by Rabbit; Feb 7 '14, 04:26 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    That's a fairly clear error message. Whatever values you're putting into your timestamp variables aren't correct.

    Comment

    Working...