I am stuck in mysql using php
===

I have to replace incorrect multiple data at a time so i used preg_replace but i am stuck because it only replace in style  spelling mistake there are multiple different incorrect style and i want replace all of them in one standard style 
so I am using cursor. but it is giving me syntax error.
I have attached my query.

CREATE PROCEDURE addcorrect()
BEGIN
DECLARE ADDRESS char(90);
DECLARE badaddress CURSOR FOR 
    SELECT 
           supplementtal_address_1
FROM aditi_po
    WHERE ((
    UPPER( street_name ) LIKE '%P%BOX%'
    OR UPPER( supplementtal_address_1 ) LIKE 'P%BOX%'
    )
    AND id NOT IN (
    SELECT id
    FROM aditi_po
    WHERE (street_name LIKE '%PO %Box%'
        or supplementtal_address_1 LIKE '%PO %Box%')
    ));

  OPEN badaddress
  
  read_loop: LOOP
    FETCH badaddress INTO ADDRESS;
    
    IF done THEN
      LEAVE read_loop;
    END IF;
	if ADDRESS LIKE '%P.O. Box%' THEN 
		print ADDRESS = PREG_REPLACE('/(.*?)(P.O. Box)/' , '$1PO Box' ,ADDRESS)
	ELSE ADDRESS LIKE '%P.O. Box%' THEN print ADDRESS = PREG_REPLACE('/(.*?)(P.O. Box)/' , '$1PO Box' ,ADDRESS)
       END IF;
  END LOOP;

  CLOSE badaddress;
END;


MySQL said: 

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 


please help me on this query

 