Re: [ErrorSystem-devel] RE: RE: ErrorSystem - proposal
Status: Planning
Brought to you by:
sonicmctails
From: <son...@ss...> - 2003-12-18 14:53:54
|
Actaully, this is what I've been coding as a class. I'm not sure if you are familer with classes (the PHP documentation isn't very clear on them either), but basically, it's a list of functions. So this class could have function a(), and function b(). Now to access it I would do something liek this: <?php class db { function a() { echo "test" } function b(){ echo test }; } $db = new db $db->a // function a $db->b // function b } ?> In other words, classes let someone make a function list, then it gets automatically prefixed. I don't like the idea of using MS-SQL, as it's syntax is not very compatiable with MySQL, and I don't have a PC I could use to help develop it. If we need to support both without goes through preg_replace hell to make them compatiable, we need to store the querys for each database in seperate files and then every time we need to use a query, we'll load it from the query file. That way, we can make it work with almost any database as all the queries could easily be changed, but it will make coding alot harder. > Ok. Could you planned when this db layer should work for MySQL? > I think we can developp ES with it if it supports MySQL, and waiting for > the > support of the ohers databases. > Maybe should you use a prefix for your functions, something like udbl > (Universal DataBase Layer), so you should have udbl_connect and so on? or > usql (Universal SQL Layer)? > I think this particular feature should interessed other people, so maybe > you > should find a way to published it more largely. > About that, I may be able to test on Microsoft SQL Server soon (not my > choice, you bet). > > Have fun, guys, > > Stephane > >> -----Message d'origine----- >> De : Jacek Olszak [mailto:e-k...@wp...] >> Envoyé : jeudi 18 décembre 2003 13:07 >> A : bro...@fr... >> Objet : RE: RE: ErrorSystem - proposal >> >> >> Dnia 17-12-2003 o godz. 14:07 BrokenClock napisal(a): >> > I think it could be a very good idea. But I don't know how to >> do it, and , >> > in particular, how to test it. >> I decide to write this class. It's very simple. It has methods >> like connect(), executeQuery(), getResultsObject() etc. These >> methods are similar to mysql_connect, mysql_query etc. but they >> work on all databases. The class read from some.ini file the type >> of database and when some of class method is invoke the class >> decide what function to use (for example mysql_connect or >> mssql_connect). >> >> >> -------------------------------------------------- >> 'Z³e zachowanie' wyrazem buntu m³odego pokolenia. >> Widowisko muzyczne ju¿ do obejrzenia! >> http://muzyka.wp.pl/imprezy.html?idn=799 >> >> >> >> >> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op¿ick > _______________________________________________ > ErrorSystem-devel mailing list > Err...@li... > https://lists.sourceforge.net/lists/listinfo/errorsystem-devel > |