Here is my procedure code. I am trying to update Username by putting old username in where clause.but it doesn't work.
DELIMITER $$
DROP PROCEDURE IF EXISTS `databasename`.`UpdateUsername` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `UpdateUsername`
(IN uname VARCHAR(30),tid VARCHAR(100),username VARCHAR(30) )
BEGIN
UPDATE table_name SET Username=username WHERE Username=uname;
END $$
DELIMITER ;
please help me to FIX this problem.
Try to remove 'username' from line number '6' and use some other parameter name. It might be conflicting with your table Username field.
For example: UPDATE table_name SET Username=OTHER_PARAMETER_NAME WHERE Username=uname;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With