Re: [GENERAL] Php abstraction layers

2005-08-31 Thread Antimon
I wrote a wrapper class based on pg_ functions. Added some logging and exception throwing capabilities etc. I'm planning to use only prepared statements and pg_query_params function when using user submitted data in queries to avoid sql-injection. I believe it is enough but gonna do some tests. Thi

Re: [GENERAL] Php abstraction layers

2005-08-31 Thread Guy Fraser
On Tue, 2005-30-08 at 21:00 -0700, Chris Travers wrote: > Antimon wrote: > > >Hi, > >I'm working on a new web project based on php and i decided to use > >PostgreSQL 8.x as > >dbms. For triggers, views, stored procedures etc. I was going to write > >a simple wrapper class and use pg_* functions. B

Re: [GENERAL] Php abstraction layers

2005-08-31 Thread Hannes Dorbath
On 31.08.2005 05:00, Greg Stark wrote: > My understanding is that PDO is the way and the light. Use PDO. Maybe you could provide some arguments on why it should be that? ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ?

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Chris Travers
Antimon wrote: Hi, I'm working on a new web project based on php and i decided to use PostgreSQL 8.x as dbms. For triggers, views, stored procedures etc. I was going to write a simple wrapper class and use pg_* functions. But some friends adviced me to use an abstraction layer. I checked PEAR:DB

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Gavin M. Roy
IMO I think it really depends on what you want to do. The pg_functions are the *most* robust and full featured. There are problems with PDO (mostly function related at this point). That being said, PDO is great to work with when you get into it, and learn your way around it. If your pr

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Greg Stark
"Antimon" <[EMAIL PROTECTED]> writes: > Thanks for the reply. > I checked new 5.1 pg_ functions and i wanna ask something else. What do > you think about PDO? It is not an abstraction layer, just something > like wrapper. I thought as it supports both widely used dbmss, php > developers would focu

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Antimon
Thanks for the reply. I checked new 5.1 pg_ functions and i wanna ask something else. What do you think about PDO? It is not an abstraction layer, just something like wrapper. I thought as it supports both widely used dbmss, php developers would focus on it more than pg or mysqli functions and that

[GENERAL] Php abstraction layers

2005-08-30 Thread Antimon
Hi, I'm working on a new web project based on php and i decided to use PostgreSQL 8.x as dbms. For triggers, views, stored procedures etc. I was going to write a simple wrapper class and use pg_* functions. But some friends adviced me to use an abstraction layer. I checked PEAR:DB and AdoDB. They l

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Hannes Dorbath
Would it be a good decision to use PDO instead of pg_ functions? I don't see much benefits in using it, it just provides a common API naming scheme. It's maybe easier in case you work with a gazillion different DBMS and have trouble remembering function names, but that's it. On the other hand

Re: [GENERAL] Php abstraction layers

2005-08-30 Thread Hannes Dorbath
In this situation, what would be the advantage of using an abstraction layer? NONE. PEAR::DB is one of the worst classes in PEAR and has lots of ugly code in it. AdoDB is IMHO a bit better, but as you said yourself, there is not a single reason why you should go through all the trouble of usi