In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says...
> I have the following code:
> 
> 
> $sql = "UPDATE class_sub SET  desc = '$catdesc', sub_cat = '$subcatname' 
> WHERE id='$catid'";
> echo $sql;
> $sql_result = mysql_query($sql);
> if (!$sql_result)
>     {    
>     echo "<P>Couldn't update record!<br></p>";
>     echo mysql_error();
>     exit;
>     } else
>     {
>     header("Location: index.php"); /* Redirect browser */
>     exit;
>     }   
> here is the actual sql statement:
> UPDATE class_sub SET desc = 'Come play with us! This class is designed 
> to challenge your cardiovascular and muscular endurance. Participants 
> will work or \"play\" in different activities such as team exercises, 
> sprints, obstacle courses, cycling, plyometrics, and core conditioning. 
> Challenge yourself like never before!', sub_cat = 'Recess' WHERE id='4'
> 
> And the error:
> 
> 
> Couldn't update record!
> 
> You have an error in your SQL syntax near 'desc = 'Come play with us! 
> This class is designed to challenge your cardiovascul' at line 1

Desc is a reserved word in mysql


-- 
Quod subigo farinam

$email =~ s/oz$/au/o;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to