I have a method for repairing some inexpensive tables--I've searched high and low and have yet to find anyone else who's published this idea. So here goes.
I once was in charge of IT for a high school, which had a lab with several inexpensive, flat-pack tables. The metal legs machine-screwed into metal bases that were attached to the undersides of the tables with 1/2" wood screws. Needless to say, a few years of high-school student abuse, and the bases started coming loose.
I drilled 1/4" holes straight through the tables where the screws went, fed carriage bolts down through the table, and tightened nuts on the underside where the wood screws used to attach. Tightening the nuts pulls the carriage bolts' round heads right up to the table--the square shank bites right into the particle board. I used just the right carriage-bolt length so protruding bolts wouldn't scratch students' legs. Since doing this, the tables are stronger than ever, and the leg bases aren't coming loose anymore.
The only disadvantage? There are going to be carriage-bolt heads visible on the surface of the table, but I'll trade that any day for not having to buy new tables--and not having the tables collapse.
I did the same trick at home with two folding tables whose leg clamps popped loose: EMT clamps and carriage bolts.