Hello,
I have a beginner question.
I have several php pages which reference a common sql.php page, via include, for connection to my MySQL database and querying tables for values. I would like to keep all my sql code in one place, however, I believe that anytime one of these pages includes the sql.php file all of the sql statements in this file are executed.
Could someone please let me know what is the best way to keep your sql statements in one file and only have the ones I need for a particular page be executed. I am thinking of dropping every sql statement into a separate function, but that seems like a hack to me.
Thank You in Advance,
-Chris