Shamrox Posted December 3, 2007 Share Posted December 3, 2007 I need to update a field in my database. I need to add the % sign to the end of numbers that currently exist in a table. Unsure how to add this to the end of the numbers for every number that exists. Can someone help me here? Link to comment https://forums.phpfreaks.com/topic/79974-solved-global-database-update/ Share on other sites More sharing options...
Shamrox Posted December 3, 2007 Author Share Posted December 3, 2007 Search long enough you can resolve yourself... Just incase anyone else was wondering, I used this method. UPDATE `table` SET `fieldname` = CONCAT(`fieldname`, 'newtext'); Link to comment https://forums.phpfreaks.com/topic/79974-solved-global-database-update/#findComment-405160 Share on other sites More sharing options...
fenway Posted December 3, 2007 Share Posted December 3, 2007 I need to add the % sign to the end of numbers that currently exist in a table. I hightly doubt you need to do this -- you're now corrupt both the underlying value as well as the data type (it can't be numeric anymore). BAD IDEA. You can always format your number for output either in mysql or in php -- but don't corrupt the data!!!! Link to comment https://forums.phpfreaks.com/topic/79974-solved-global-database-update/#findComment-405169 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.