Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE
-- The table I'm using CREATE TABLE IF NOT EXISTS `SentAndWraps` ( `UDID` varchar(500) NOT NULL, `sends` int(11) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`UDID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; INSERT INTO `SentAndWraps` (`UDID`, `sends`) VALUES ('Test', 0); -- What I run through netbeans, makes it easy to debug. DROP FUNCTION AddWraps; DELIMITER : CREATE FUNCTION AddWraps(u VARCHAR(500), s INT(11), w INT(11)) RETURNS VARCHAR(500) BEGIN DECLARE sen INT(11) unsigned; DECLARE rem INT(11) unsigned; SELECT `sends` INTO sen FROM `SentAndWraps` WHERE `UDID`=u FOR UPDATE; SET rem = sen + s; UPDATE `SentAndWraps` SET `sends`=rem WHERE `UDID`=u; -- THIS LINE HERE INCREMENTS BY 1 RETURN CONCAT('What is retrived from DB:',sen,' what Im adding:',s,' what should be on the next retrievle:',rem); END : DELIMITER ; SELECT AddWraps('Test',1,3);