Kill the final comma, i.e.

...
SET SailPort = ?,
    SailDate = ?,
    Deleted = ?
WHERE ...

-- 
"There cannot be a crisis today.  My schedule is already full."
     --Henry Kissinger

> -----Original Message-----
> From: Don [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, January 23, 2001 13:24
> To: msql list
> Subject: Syntax error in my Update staement
> 
> 
> Hi all,
> 
> The compiler is reporting a syntax error in mySQL statement near the
> WHERE clause.  Help.  Perl code is as such:
> 
> $sqlCmd = $dbh->prepare (q{
>           UPDATE Sailings
>           SET SailPort = ?,
>                   SailDate = ?,
>                   Deleted  = ?,
>           WHERE Vessel = ? AND Voyage = ?
>           }) or die "Can't update Sailings record: $DBI::errstr";
> 
> $sqlCmd->execute($sailPort, $sailDate, $deleted, $vessel, $voyage)
>          or die "Can't execute update statement into Sailings:
> $DBI::errstr";
> 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to