|
Posted by Joshua Ruppert on 12/10/20 11:55
ZafT wrote:
> >
> > have you tried running mysql_error() after the update's. You may have a
> > single quote/apostrophy in $name, $description, or $show that needs to
> > be escaped before the string can be used in the query. I'm not sure
> > what the escape character is in MySQL, but in SQL Server you just have
> > to double the single quotes to have the dbms treat it as part of the
> > string instead of the end of the string.
> >
> > Josh
> >
>
> I tried this:
>
> $link = mysql_connect($dbserver,$username,$password)
> or die( "Unable to connect");
>
> <snip .....>
>
> $query="UPDATE project SET name='$name',
> description='$description',
> show='$show'
> WHERE id=$id";
> mysql_query($query);
> mysql_error($link);
>
> No errors. Is that what you meant?
>
> Shane
You're not actually capturing the mysql_error() output. Try either:
print(mysql_error($link));
or this if you want to use the text in your code
$qryErr = mysql_error($link);
Josh
[Back to original message]
|