When I first started learning PHP, I would write query statements similar to the one here:
mysql_query("SELECT * FROM `table`") or die(mysql_error());
What is the best, present-day way, to achieve the same effect as the above?
To my understanding, in today's world with classes, functions, and general OOP, running a bunch of queries in this manner is very inefficient. What should we be doing differently?
or die()
method of "error handling", still so prevalent in online PHP tutorials. – Trapeziform