Serendipity is looking in a haystack for a needle and finding a farmer’s daughter.
–Julius Comroe, Jr.
Serendipity is looking in a haystack for a needle and finding a farmer’s daughter.
–Julius Comroe, Jr.
Code to search across the text of all stored procedures for a particular string.
SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE ‘%foobar%’
AND ROUTINE_TYPE=’PROCEDURE’
This may be obvious to some, but I had a hard time figuring it out at first. I needed to call the constructor of a parent class in the child. This is handy when you have things that happen in the constructor of all children, but one place where there is some extra stuff that needs to happen. Rather than duplicate the common things, just call the parent constructor before doing your extra stuff.
parent::Node($rTypes);
In this case it will call the parent class name Node and will pass the row record variable that was passed to the child constructor.