All Products 
Username / Customer#
Password
Log In
 Hi,  |  Log Out
  • Site Search
  • Domain Search
  • WHOIS Domain Check
24/7 Support: (480) 505-8877
Hablamos Español
9 AM to 9 PM IST
7 days a week
Go Daddy Support

Search help articles, forums, and discussion groups

Cannot UPDATE to MySQL from PHP

Viewing post 1 to 3 (3 total posts)
Profile picture of hwilson

hwilson said 11 months, 4 weeks ago:

I cannot seem to get the following query to run from PHP:

mysql_query(“UPDATE users SET Description=’$newDescription’ WHERE id=’$id’”);

This works successfully on another domain, so I’m confused why it doesn’t work here.

(And: newDescription is a text variable; id is an integer)

Of course, I have correctly initialized the MySQL with database, user, pass, etc.

Profile picture of hwilson

hwilson said 11 months, 4 weeks ago:

To clarify: I do not get an error message, but nothing is actually updated.

Profile picture of Gary A

GoDaddy Expert Gary A said 11 months, 4 weeks ago:

@hwilson

You might want to test the query by running it from phpMyAdmin. If it works through phpMyAdmin, then this might indicate that there is an issue with the PHP leading up to the query. If it doesn’t work through phpMyAdmin, this might indicate that there is an issue with either the query itself or the table. Information on accessing phpMyAdmin can be found in this article:

http://support.godaddy.com/help/article/5942/using-phpmyadmin-to-manage-mysql-databases

-Gary

Add a reply:

You will auto join this group when you reply to this topic.

When posting about a technical issue, please be sure to include as many details as possible, such as your domain name, related URLs and other pertinent information. This consideration will allow us to better understand the situation and quickly assist you.