
dws
Deleted
Jun 26, 2000, 10:49 PM
Post #2 of 3
(688 views)
|
|
Re: Bad date external representation Error
[In reply to]
|
Can't Post
|
|
It appears that by expanding the date into the query yourself, you're not getting it into a form that the underlying database will accept. Try binding the date as a parameter. In that way, perhaps [note: this means I'm speculating] the underlying binding mechanism will do the correct converion for you. <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR> $statement="update inventory set $update where idnumber='$id' and catno='$catno' and datereceived=?"; my $sth1 = $dbh1->prepare($statement); my $rv1= $sth1->execute($datereceived) or die print $dbh->errstr,"\n",$statement;</pre><HR></BLOCKQUOTE> If that doesn't work, you'll need to figure out what date format the underlying database wants, and force the $daterecieved into that format.
|