in reply to Date Problem
my $SQL ="Select tran_seq_nbr, sale_amount From Header Where org_numbe +r = 8 And store_number = 3 And tran_number = 2127 And terminal_number + = 8 And tran_Date = to_date(?,'YYYY-MM-DD HH24:MI:SS')"; $sth->execute($date) or die $sth->errstr;
Let me try that again, obviously I can't concentrate on sending a sms at the same time as answering your post :P
my $SQL ="Select tran_seq_nbr, sale_amount From Header Where org_numbe +r = 8 And store_number = 3 And tran_number = 2127 And terminal_number + = 8 And tran_Date = to_date(?,'YYYY-MM-DD HH24:MI:SS')"; $sth->prepare($SQL); $sth->execute($date) or die $sth->errstr;
See the section on placeholders from the DBI documentation.
Update: Fixed my reply, not enough caffeine on a Monday morning while trying to do two things at once :P
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Date Problem
by Anonymous Monk on Apr 26, 2010 at 09:55 UTC | |
by marto (Cardinal) on Apr 26, 2010 at 10:59 UTC | |
by nagalenoj (Friar) on Apr 26, 2010 at 10:36 UTC |