XpertWorlock Posted February 3, 2010 Share Posted February 3, 2010 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 More sharing options...
Illusion Posted February 3, 2010 Share Posted February 3, 2010 Following functions are of interest CONCAT CAST CONCAT_WS Link to comment https://forums.phpfreaks.com/topic/190786-update-append-as-string/#findComment-1006060 Share on other sites More sharing options...
XpertWorlock Posted February 3, 2010 Author Share Posted February 3, 2010 thanks I'll take a look into them Link to comment https://forums.phpfreaks.com/topic/190786-update-append-as-string/#findComment-1006061 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.