Jump to content

Recommended Posts

I'm having problem updating a column and appending new data, it does not want to append as a string, instead it adds the two numbers together

 

mysql_query("UPDATE users SET usersDenied = usersDenied + ( '$_SESSION[id]') WHERE id = '$_POST[iD]'");

 

usersDenied would be something like '5,'

 

So I want to add something like '2,' making it '5, 2,'

 

 

 

instead it will just add the two making the value 7.  I've tried '+' and also tried '.', obviously I'm doing something wrong.  I assume this is still possible to do.

 

Also I'm having a hard time inserting commas into usersDenied which has a type of 'text'.  I've added back slashes and tried without backslashes, but have had no luck

 

Anyways thanks for looking at this

Link to comment
https://forums.phpfreaks.com/topic/190786-update-append-as-string/
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.