By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,943 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,943 IT Pros & Developers. It's quick & easy.

invalid input syntax for type timestamp:

P: 1
php code

Expand|Select|Wrap|Line Numbers
  1. $from=$_GET['from'];
  2. $to=$_GET['to'];
  3. $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'";
  4.     $result1=db_query($query1);
  5.     $row1=db_fetch_array($result1);
  6.     $depot_id=$row1['contact_id'];
  7.  
  8. $sl=0;
  9. 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'";
  10.  
  11. design code
  12.  
  13. <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>
Feb 7 '14 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,364
That's a fairly clear error message. Whatever values you're putting into your timestamp variables aren't correct.
Feb 7 '14 #2

Post your reply

Sign in to post your reply or Sign up for a free account.