Drawbacks to Creating Large Numbers of Tables in the Same Database If you have many files in a directory, open, close, and create operations will be slow. If you execute SELECT statements on many different tables, there will be a little overhead when the table cache is full, because for every table that has to be opened, another must be closed. |
#If table exists, start: function show_thread($table, $parent, $trail=array('')) { ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() } #Call the function with 0 as the parent comment thread(TABLE_NAME, 0); |
CREATE TABLE IF NOT EXISTS...
can save you a lot of hassle.function kill_branch($table, $parent) {![]() ![]() ![]() ![]() ![]() ![]() } kill_branch(TABLE_NAME, COMMENT_ID); |
DELETE FROM comments WHERE ID=COMMENT_ID OR parent_ID=COMMENT_ID
and be reasonably safe. Eventually, we realised that