New to the world of stored procedures.
Am calling.
[code=php] $execute1 = mysql_query("CALL firstsub('TWIT','$_POST[arg0]','1')") or die(mysql_error());
$execute2 = mysql_query("Update hierarchy set base_zip='$_POST[arg0]' where org_name='$_POST[arg0]'") or die(mysql_error());
[/code]
The call on the stored procedure calls:
SELECT @myleft := lft FROM hierarchy WHERE org_name = parent and org_id = origorgid;
SELECT @refid := MAX(ref_id) FROM hierarchy;
UPDATE hierarchy SET rgt = rgt + 2 WHERE rgt > @myleft;
UPDATE hierarchy SET lft = lft + 2 WHERE lft > @myleft;
INSERT INTO hierarchy(org_name, lft, rgt,ref_id) VALUES(old , @myleft + 1, @myleft + 2, @refid + 1);
And I end up with the error stated in the subject.....
Google searches didn't really address the issue for me.
It is failing on the update after running the SP.
Thanks