Reply to Re: Update query issue...

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация