473,324 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

invalid input syntax for type timestamp:

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
1 5816
Rabbit
12,516 Expert Mod 8TB
That's a fairly clear error message. Whatever values you're putting into your timestamp variables aren't correct.
Feb 7 '14 #2

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

Similar topics

12
by: Randell D. | last post by:
Folks, I have a form called "ourTestForm". Its a test form - nothing special - it contains five input tags - they are named one, two, three, four and five. The input tags are of type...
10
by: jeff regoord | last post by:
A user inputs a float value. The scanf() function gets the value. However, I need to create an error handler with an if else statement saying invalid input if the input is not a number. Does...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
3
by: mike | last post by:
I have the following view definition Column | Type | Modifiers ----------------+-----------------------+----------- bcode | character varying(15) | subhead ...
6
by: Scott Nixon | last post by:
New to Postgres 7.3 from 7.0. Am having some trouble with a query that worked in 7.0 but not in 7.3.....can't seem to figure out the syntax or find info about how to do this anywhere. ...
1
by: pugalenthi | last post by:
I need to store a c# variable of data type timestamp into the SQL Server 2005 database. An example of how the variable value looks is as follows, 00:00:01.5000000 It represents the...
3
by: ALKASER266 | last post by:
Hey guyz I am a java beginner and I have problem with part of the code. The thing that I don't know how to do it in this code is how to show the user that he/she has input an invalid input In my...
1
by: 1251ila | last post by:
I am trying to import a text file into a postgres table and I get the following error message: Invalid input syntax for type date: field name The date format is yyyy-mm-dd So the text file...
4
by: Xavier Chaandra | last post by:
Hello, I was wondering how to stop a program if invalid input is used. I am working on a problem about ultimate frisbee teams. The input I ask for is how many wins they have. They only play 10...
0
by: hikmat | last post by:
I have written this function: CREATE OR REPLACE FUNCTION get_date2(idate date) RETURNS date AS $$ DECLARE tmp text; BEGIN SELECT to_char(idate, 'FMDDth FMMon YYYY') into tmp; return...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.