Nesting SQL queries
by Ben Blundell, May 30, 2006 08:10
I have written a script that includes an SQL statement, and it recursively calls itself with the results of the query until the query returns no result (well, in theory).
I have found that it will allow me to nest up to 7 levels with a SELECT query and only up to 5 levels with an UPDATE query. After this, the web server tends to crash.
Can these limits be easily changed? I am using the script to generate a tree-like message structure for a forum, and using recursion is the simplest and neatest way of making the tree structure.
Name E-mail optional TopicMessage:
HTTP Link: Link text: