Id news_id an integer?

$query = "UPDATE dvd.news_categories SET 
newscategory='$newscategory', 
newscat_status='$newscat_status' WHERE newscat_id='$newsid'";
                                                      ^ if this is an
integer in the datebase then it wont update  proproly.

Should look like this

$query = "UPDATE dvd.news_categories SET 
newscategory='$newscategory', 
newscat_status='$newscat_status' WHERE newscat_id = $newsid";

Hope this helps

Thank You
Brian Paulson
Sr. Web Developer
The Pueblo Chieftain Online
[EMAIL PROTECTED]
http://www.chieftain.com 


> -----Original Message-----
> From: Rick Emery [mailto:[EMAIL PROTECTED]] 
> Sent: Wednesday, September 26, 2001 10:59 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Huw do I perform update? I missed the 
> accual code bit.. sorry 
> 
> 
> What does table look like?
> What does preceding code look like?
> What error message are you getting?
> 
> Try printing the value of $query.  What does it look like?  
> Copy/paste that into mysql directly; what error do you get?
> 
> -----Original Message-----
> From: Tommy Nilsson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 26, 2001 11:14 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Huw do I perform update? I missed the 
> accual code bit.. sorry 
> 
> 
> Sorry,:
> This is my query:
> $query = "UPDATE dvd.news_categories SET 
> newscategory='$newscategory', 
> newscat_status='$newscat_status' WHERE newscat_id='$newsid'";
>  
> but it doesn't seem to work.
>  
> help anyone?
>  
> //Tommy
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 
> 
> 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to