Closed
Bug 276292
Opened 21 years ago
Closed 20 years ago
Create separate files for SQL
Categories
(addons.mozilla.org Graveyard :: Developer Pages, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.0
People
(Reporter: Bugzilla-alanjstrBugs, Assigned: Bugzilla-alanjstrBugs)
Details
(Keywords: helpwanted)
To reduce the number of times code is repeated, we should have a separate file
with the SQL statements. Basically, you pass in variables to a function call,
and it returns a recordset. This would be similar to stored procedures.
An example:
showlist, moreinfo, rss, and another file or two need a list of authors given an
item ID.
We should create separate files for SELECT, INSERT, UPDATE, and DELETEs so that
the end-user site doesn't even have a chance of exposing anything dangerous.
This sounds very good.
PEAR :: DB_QueryTool
http://opensource.visionp.biz/index.php?id=78
Assignee: nobody → cst
Assignee: cst → Bugzilla-alanjstrBugs
Keywords: helpwanted
Comment 2•20 years ago
|
||
Good idea in theory, but I doubt if it will work in practise. Frankly, I have
never seen any project which keeps all its sql in one file.
One thing that I have seen is that some projects keep their sqls at the top of
the file in a hash. For example -
$sql['extension']='select blah1,blha2 from table blah';
$sql['theme'] = 'select from ---';
and so on.
I am not sure if this method has any advantage over what is being done currently.
Resolved by addons/shared/lib/ class files
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•