Re: [SQLHat] Proposal
| From: | Lukas Smith | Date: | Tue, 06 Apr 2004 14:48:05 +0000 |
| Subject: | Re: [SQLHat] Proposal | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27091@lists.php.net to get a copy of this message | ||
Kamen TOMOV wrote:
I will summarize the reasons why I'd choose not to make SQL files included with include()/require() construct : * The SQL-files should be independent from PHP or any other the programming language and therefore they shouldn't contain tags like "<?php"; * There is no need to use complex constructs in the SQL files beyond the conditional "IF" statement for (not-)including query fragments. Actually you was right that this should be discouraged.Well sometimes you need more than if's actually. Should be rare, but I would be weary of this. Of course you might be able to overcome this limitation by choosing from a larger set of different ".sql" inside your application. So maybe the best approach is this: Allow both! Actually it might be that the perl/python folks will ask for something similar just in their flavor. So if you provide your syntax, plus native solution you might be win everybody. Otherwise you might end up with the same argument when trying to convince each of your target languages. So if people choose to use their native syntax they cant move to a different language easily. However they get the benefit of staying in "their" world. People that want their ".sql" files to be portable acrosss languages use your syntax along with the extension. Your viewer would then have to support each language though. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07