creek16 Posted July 4, 2011 Share Posted July 4, 2011 Hi guys, I am creating a module that will get the value from mysql db and increment it. But my problem is it is mixed with a character. To give you an overview here's the format from the column vendor_code. "V001". So as you can see there a "V" on the data. How will I get the value and increment it? any idea. maybe some concatenation will do. thanks in advance. Link to comment https://forums.phpfreaks.com/topic/241036-help-with-code-generation-logic/ Share on other sites More sharing options...
Nuv Posted July 4, 2011 Share Posted July 4, 2011 Out of V001 , do you need 001 i.e only the digits and remove the V ? Link to comment https://forums.phpfreaks.com/topic/241036-help-with-code-generation-logic/#findComment-1238084 Share on other sites More sharing options...
priti Posted July 4, 2011 Share Posted July 4, 2011 From V001 you want '1' you can use following function substr('V001',-1) Link to comment https://forums.phpfreaks.com/topic/241036-help-with-code-generation-logic/#findComment-1238225 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.