Jump to content

Update append as string


XpertWorlock

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.