Jump to content

Updating the same values to db


gaffafoote

Recommended Posts

Hi there.

 

I am pulling information from my database and populating some forms with this information. This is in the aim of letting the user UPDATE information. If the user then changes their mind about changing the values and leaves them the same, the query then tries to update the fields with the same values as they already contain. This then causes my scripts to stop yet mysql_error is not bringing back any information.

§

 

$query = "UPDATE fp_tags SET tag1='$tag1', tag2='$tag2', tag3='$tag3' WHERE page_id='$tid'";

$result = @mysql_query ($query) OR DIE(mysql_error());

 

 

echo '<p>'.mysql_error() .'<br /><br />This error relates to this query: ' .$query.

 

 

Yours with bleary eyes,

 

Gareth

Link to comment
Share on other sites

Try "echo $query;", and take a look at it.

 

Also try adding this:

 

ini_set('display_errors', 1);

 

That'll make sure php tells you why it is stopping.

 

If you're still having trouble, post your entire script here and we'll take a look :)

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.