|
Posted by David Haynes on 12/30/05 01:32
Jean Pierre Daviau wrote:
> Hi to everyone,
>
>
>
> Somebody can help me on this?
>
>
>
> here is what the html page shows:
>
> There was a database error when executing <PRE>UPDATE stories SET
> writer='JPD' , page = 'news', headline = 'Test', story_text = 'Na Na',
> picture = 'pictures/one.jpg', modified = '1135893089', WHERE id = '7'
> </PRE>Syntax error near 'WHERE id = '7'' at line 1
> ------I went in my SQL with no more information
>
> UPDATE stories SET writer = 'JPD',
> page = 'news',
> headline = 'Test',
> story_text = 'Na Na ',
> picture = 'pictures/one.jpg',
> modified = '1135893089',
> WHERE id = '7'
>
> #1064 - Syntax error near 'WHERE id = '7'' ?at line 1
>
> ------
>
> here is my php:
> $sql = "UPDATE stories SET writer='$auth_user' , page = '$page', headline
> = '$headline', story_text = '$story_text', picture = '$filename', modified
> = '$time', WHERE id = '$story' ";
>
Get rid of the comma before WHERE.
-david-
Navigation:
[Reply to this message]
|