Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Bind param error

by rowdog (Curate)
on Jun 30, 2010 at 04:06 UTC ( #847239=note: print w/ replies, xml ) Need Help??


in reply to Bind param error

In your prepare statement for $sth1 you have

h.net_due_date as NET_DUE_DATE, #Added for Revision 1.6 h.status as STATUS #Added for Revision 1.6

I know a lot more Perl than SQL but I doubt those are legal SQL comments.


Comment on Re: Bind param error
Download Code
Re^2: Bind param error
by stevieb (Hermit) on Jun 30, 2010 at 13:07 UTC

    fwiw, those are legit SQL commands (at least in MySQL):

    mysql> select username as client_name from clients limit 1; +-------------+ | client_name | +-------------+ | stevieb | +-------------+

    Steve

      Really? SQLite disagrees...

      sqlite> select count(*) from show; # illegal comment; 27 Error: unrecognized token: "#"

      I guess I wasn't clear enough: Perl comments aren't valid SQL.

Re^2: Bind param error
by doug145 (Initiate) on Jun 30, 2010 at 18:58 UTC
    Rowdog, I thought this was PERL, not SQL. Anyway, using 'as ' with aliases has worked fine in the current version of the code.

      I wasn't questioning the commands, I was questioning the use of Perl comments in SQL.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://847239]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2014-07-29 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (220 votes), past polls