Posted by David Haynes on 02/27/06 05:17
David Haynes wrote:
>
> or if you don't like the use of <<<
> //---UPDATE ENTRY IN DATABASE---
> $sql = "UPDATE "
> ."calendar_events "
> ."SET "
> ."event_title = '$title', "
> ."event_start = '$date', "
> ."event_shortdesc = '$desc' "
> ."WHERE id = $event ";
> mysql_query($query) or die(mysql_error());
> $count = mysql_affected_rows($result);
>
> Either of these last two methods allows you to add/subtract/edit the SQL
> without having to walk a huge line of code.
>
> -david-
>
.... of course the query should be
mysql_query($sql) or die(mysql_error());
-david-
[Back to original message]
|