Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 8th, 2008, 10:48 AM
Newbie
 
Join Date: Aug 2008
Posts: 27
Default Bad date error

HI
Can Anyone help me in correcting the error.I have a datbase in psql which has a date field.While trying to insert it using php form i am getting the error:
Quote:
Warning: pg_query(): Query failed: ERROR: Bad date external representation '' . in
/var/www/html/date.php
But When i try to insert directly from Database it is working.
What may be the problem??Anyone please help.

Thank u in advance.
Reply
  #2  
Old September 8th, 2008, 11:58 AM
Moderator
 
Join Date: Dec 2006
Posts: 250
Default

Are you sure the date format you use in postgres and in the script are the same?
Reply
  #3  
Old September 9th, 2008, 10:04 AM
Newbie
 
Join Date: Aug 2008
Posts: 27
Default

hi some how i managed to correct the date format.Now i have a problem with the phone number field.I have specified while creating the table as phone integer.But when i try to insert a value which has more than 10 digits,it shows error.No validation has done yet.
How can i correct it.
Reply
  #4  
Old September 9th, 2008, 10:17 AM
Moderator
 
Join Date: Dec 2006
Posts: 250
Default

Quote:
Originally Posted by sreenisha
hi some how i managed to correct the date format.Now i have a problem with the phone number field.I have specified while creating the table as phone integer.But when i try to insert a value which has more than 10 digits,it shows error.No validation has done yet.
How can i correct it.
change the column type to varchar(max_number_of_characters) or char(max_number_of_characters)
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles