RE: database update
Check what you are trying to do in the SQL. You are setting CustNo = $custNo and PIN = $pin WHERE they already have those values. This is not causing your parser problem, but it might be a source of confusion. Cheers, Jim -Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 4:29 PM To: 'Rob'; [EMAIL PROTECTED] Subject: RE: database update > -Original Message- > From: Rob [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 2:24 PM > To: [EMAIL PROTECTED] > Subject: database update > > > The following line works from a script run from the command > line on the > server... > > $sql = "UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes' > WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and > Serial = '$serial'"; > > but when run from cgi I get the following error... > > ERROR: parser: parse error at or near "," > > I'm using the Pg module, any idea why it won't run from the web? Are you dumping out $sql somewhere? Perhaps $custNo is blank, which would give you: UPDATE data SET CustNo = , PIN = ... ^^ syntax error here -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: database update
> -Original Message- > From: Rob [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 2:24 PM > To: [EMAIL PROTECTED] > Subject: database update > > > The following line works from a script run from the command > line on the > server... > > $sql = "UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes' > WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and > Serial = '$serial'"; > > but when run from cgi I get the following error... > > ERROR: parser: parse error at or near "," > > I'm using the Pg module, any idea why it won't run from the web? Are you dumping out $sql somewhere? Perhaps $custNo is blank, which would give you: UPDATE data SET CustNo = , PIN = ... ^^ syntax error here -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: database update
use the quote() method or placeholders. both are described in 'perldoc DBI' > -Original Message- > From: Rob [mailto:[EMAIL PROTECTED]] > Sent: Thursday, August 15, 2002 2:24 PM > To: [EMAIL PROTECTED] > Subject: database update > > > The following line works from a script run from the command > line on the > server... > > $sql = "UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes' > WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and > Serial = '$serial'"; > > but when run from cgi I get the following error... > > ERROR: parser: parse error at or near "," > > I'm using the Pg module, any idea why it won't run from the web? > > Rob > > Good judgement comes from experience, and experience - > well, that comes from poor judgement. > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: database update
Rob wrote: > > The following line works from a script run from the command line on the > server... > > $sql = "UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes' > WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and > Serial = '$serial'"; > > but when run from cgi I get the following error... > > ERROR: parser: parse error at or near "," > > I'm using the Pg module, any idea why it won't run from the web? Try single or double quotes around your varilables, IE.. CustNo = '$custNo', PIN = '$pin' or read up on placeholders. -- Mike(mickalo)Blezien =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Thunder Rain Internet Publishing Providing Internet Solutions that work! http://www.thunder-rain.com Bus Phone: 1(985)902-8484 Cellular: 1(985)320-1191 Fax:1(985)345-2419 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
database update
The following line works from a script run from the command line on the server... $sql = "UPDATE data SET CustNo = $custNo, PIN = $pin, Notes = '$notes' WHERE CustNo = $custNo and PIN = $pin and CustName = '$custName' and Serial = '$serial'"; but when run from cgi I get the following error... ERROR: parser: parse error at or near "," I'm using the Pg module, any idea why it won't run from the web? Rob Good judgement comes from experience, and experience - well, that comes from poor judgement. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]