| Re: newbie: debugging stored procedure, how? -
06-04-2007, 07:50 AM
okay, I've solved it by using this sql statement: select "helloworld" as
"action";
"Jeff" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED...
> Hey
>
> I've created a stored procedure in a MySql5 database.
>
> I've got some problems with this stored procedure. So I thought it would
> be great to insert some kind of code which can generate debug info. I
> tryed to use print "helloworld"; but that doesn't work...
>
> By the way, this is the body of the stored procedure:
> BEGIN
> DECLARE counter int;
> IF (id = NULL)THEN
> SELECT count(*) INTO counter FROM Property WHERE UniqueId =
> uniqueId;
> IF (counter=0) THEN
> INSERT INTO Property (Field1, Field2) VALUES (field1, field2);
> END IF;
> ELSE
> UPDATE Property
> Set Field1 = field1,
> Field2 = field2
> WHERE Id = id;
> END IF;
> END;
>
> any suggestions?
>
> Jeff
> |