Jump to content

Recommended Posts

I have a table called comments and a field inside this table called entry. One of the values in the entry field is 7 but I want it to change to 3. I have another field called ID where entry 7 (the one I am trying to change) has the ID of 20. Basically something like this: where id=20 change entry=7 to 3

 

The line of code below is is what I have tried to use to change the ID of this entry but it didnt work (I have tried other variations).

 

$result = mysql_query("UPDATE php_blog_comments SET entry='3' WHERE entry=7; ") or print ("Can't update entry.<br />" . mysql_error());

 

In the browser it says query was empty

 

I want to change entry 7 to entry 3.

 

Is this possible?

 

 

Link to comment
https://forums.phpfreaks.com/topic/52254-how-to-change-an-entry-number/
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.