Re: cvs: pear /DB_DataObject DataObject.php
| From: | Justin Patrin | Date: | Sat, 17 Sep 2005 18:36:13 +0000 |
| Subject: | Re: cvs: pear /DB_DataObject DataObject.php | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39862@lists.php.net to get a copy of this message | ||
On 9/16/05, Alan Knowles <alan_k@php.net> wrote:
> alan_k Sat Sep 17 00:51:53 2005 EDT
>
> Modified files:
> /pear/DB_DataObject DataObject.php
> Log:
> fix bug #5416 - use tablea AS tableb only for postgress/mysql - oracle doesnt need the AS bit
> - and I guess a few others too..
>
>
> http://cvs.php.net/diff.php/pear/DB_DataObject/DataObject.php?r1=1.372&r2=1.373&ty=u
> Index: pear/DB_DataObject/DataObject.php
> diff -u pear/DB_DataObject/DataObject.php:1.372 pear/DB_DataObject/DataObject.php:1.373
> --- pear/DB_DataObject/DataObject.php:1.372 Sat Sep 17 00:00:15 2005
> +++ pear/DB_DataObject/DataObject.php Sat Sep 17 00:51:50 2005
> @@ -15,7 +15,7 @@
> * @author Alan Knowles <alan@akbkhome.com>
> * @copyright 1997-2005 The PHP Group
> * @license http://www.php.net/license/3_0.txt PHP License
> 3.0
> - * @version CVS: $Id: DataObject.php,v 1.372 2005/09/17 04:00:15 alan_k Exp $
> + * @version CVS: $Id: DataObject.php,v 1.373 2005/09/17 04:51:50 alan_k Exp $
> * @link http://pear.php.net/package/DB_DataObject
> */
>
> @@ -3041,7 +3041,7 @@
> $fullJoinAs = '';
> $addJoinAs = ($quoteIdentifiers ? $DB->quoteIdentifier($obj->__table) :
> $obj->__table) != $joinAs;
> if ($addJoinAs) {
> - $fullJoinAs = "AS {$joinAs}";
> + $fullJoinAs =
> in_array($DB->dsn["phptype"],array('mysql','mysql','pgsql'))
> ? "AS {$joinAs}" : $joinAs;
Looks like you have an extra 'mysql' in there. Also, I'm pretty sure
you don't need the AS for mysql. I like it better myself as it makes
the "rename" more apparent, but it's not required.
> } else {
> // if
> if (
>
--
Justin Patrin