Re: Re: New Package: Structures_DataGrid_DataSource for PDO

From: Date: Sat, 21 Apr 2007 18:31:57 +0000
Subject: Re: Re: New Package: Structures_DataGrid_DataSource for PDO
References: 1 2 3 4 5  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-46355@lists.php.net to get a copy of this message
Thanks I'll take a look at the other drivers. Can you send me the sample scripts that failed? Also, why the '&' here? Don't you want to create a new instance of the object?
$datagrid =& new Structures_DataGrid();
Dave On 4/21/07, Mark Wiesemann <wiesemann@php.net> wrote:
Hi David, David Wilson wrote: Sorry for the delay. Attached is a link to the code. That is a temporary link. This is my first time trying to code to the PEAR standards. I'm sure I'm missing some things. In fact, the delay was because I wanted to put in some comments. If you want to make this a package, give me another revision to fix the method block format and other little things before you spend too much time reviewing it. I had a short look into your code and run an example script with your driver. This had a funny effect: When I changed the sorting order for a column, my date column (in this example I had five records) lost all or some of its values. "Lost" is meant as that the date values showed up as "0000-00-00 00:00:00" instead of the real values. There are mainly two things that need to be done: - combine the DBQuery, MDB2 and PDO drivers - let your PDO driver behave like the other two drivers do it, e.g. regarding how the SQL query is specified, how the counting query is automatically build in many cases (in the cases there is an option) etc. The "funny" DSN specification for PDO (compared to the one of DB and MDB2) requires some thinking for a smart way of specifying it in the new driver. The main difference (apart from the syntax) is that the username and the password are two extra parameters in the PDO constructor, while the (M)DB(2) DSN strings already contains these values. We should discuss the details directly via email, not via the pear-dev list. Please send your emails to both Olivier and me, thanks. BTW: I just tried to use just "$datagrid =& new Structures_DataGrid();". This leads to a fatal PHP error in your driver. By adopting the way the other two drivers work, this might not be a problem anymore. Regards, Mark -- http://www.markwiesemann.eu


« previous php.pear.dev (#46355) next »