Jump to content

Simple query not working...


AdrianRobinson

Recommended Posts

There's nothing technically wrong with the query you posted, provided the variables have expected values, the columns you are referencing exist, the user_no exists, and there are not any other problems in your code such as no database connection...

 

A) echo $query_update_user; so that you know exactly what it contains.

 

B) Are you actually executing the query using a mysql_query() statement? (you would not believe how many times people ask why their query is not doing anything but they don't actually have any code to execute the query.)

 

C) Do you have any error checking and error reporting logic to test if the mysql_query executed without any errors and to tell you if/why the query failed? (if you look at any of the similar threads in the forum, i.e. my query is not working..., you will find suggested  code using mysql_error() that test if the query worked or not and displays the mysql_error() output when it does not.)

 

D) Is the code with the query statement and the mysql_query() statement actually being executed? Perhaps it is in a conditional statement that is false or the whole page is not running due to a fatal parse error or a fatal runtime error.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.