» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2006, 01:46 PM
kingkong kingkong is offline
Junior Member
 
Join Date: Aug 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
kingkong is on a distinguished road
Default Mysql Error Out Of Nowhere

Correct this error please, thanks

Code:

$query = "UPDATE `users` SET `picture` = '$file_name' WHERE `username` ='$username'"; echo "debug: functions $query"; mysql_query($query); echo mysql_error(); echo mysql_info();
results in:

debug: functions UPDATE `users` SET `picture` = 'blahblah3964.gif' WHERE `username` ='blahblahusername'Rows matched: 1 Changed: 1 Warnings: 0

and yet...no rows were changed! I checked the entire database!

picture is a varchar, by the way. and file_name is a string. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-14-2006, 01:48 PM
roberto roberto is offline
OSP Starters
 
Join Date: Mar 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
roberto is on a distinguished road
Default

You could try updating the query like this, not sure but you can try
php Code:

$query = sprintf("UPDATE `users` SET `picture` = '%s' WHERE `username` ='%s'", mysql_real_escape_string($file_name), mysql_real_escape_string($username));
Try printing the relevant portion of the db before and after the change to see if there is any difference whatsoever. Maybe set $blah = mysql_query($query); and verify $blah is okay? -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  #3  
Old 08-14-2006, 01:49 PM
nicolas nicolas is offline
OSP Starters
 
Join Date: Apr 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
nicolas is on a distinguished road
Default

Without seeing the real error, it impossible for us to tell. Turn up your error reporting, paste the actual query here. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL failing? Blinck MySQL Forums 1 01-04-2007 06:08 AM
Getting MySQL & PHP to communicate JCH MySQL Forums 0 05-29-2006 01:52 PM
Alcatel Selects MySQL AB outsourcingplans Web Hosting News 0 12-13-2005 04:03 PM
MySQL 5 and MySQL 4.1 on One Machine ?? omen MySQL Forums 1 12-09-2005 06:07 AM
MySQL 5.1.3-alpha has been released gunet MySQL Forums 0 12-09-2005 03:55 AM


All times are GMT. The time now is 03:21 AM.