Re: Storing SQL Queries for Reuse in Apps

From: Date: Fri, 11 Jul 2003 22:40:50 +0000
Subject: Re: Storing SQL Queries for Reuse in Apps
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-154937@lists.php.net to get a copy of this message
On Jul 10, 2003, "Jacob C" claimed that: |Hello All, | |I just want to survey the list and see what kind of solutions people are using |for the storage and reuse of SQL queries. | |Right now I am working on an application that has native SQL queries as well |as custom queries that can be added by developers as they build on the |framework. | |In the past I have done several things to store large sets of SQL queries. |Some are better than others and some just shouldn't be used (hardcoded): | |- Hardcoded into the application (written into classes or procedural code as |needed). |- Stored in a delimited text file. |- Placed into a function or class method using switch to iterate by category |and ID. |- Stored in an XML file. | |I am kind of leaning towards the XML solution since the native queries can |then easily be updated for people using the application. Of course using XML |adds execution time and complexity to the app. | |Anybody have any other solutions I haven't thought of or trick/tweaks to the |ones I have listed? | |Thanks! |Jacob IIRC, phpMyAdmin uses stored queries. It places them in a table in the database. http://sourceforge.net/projects/phpmyadmin/ -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855.

« previous php.general (#154937) next »