<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=MDB_QueryTool</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/17290" />
      <rdf:li rdf:resource="http://pear.php.net/bug/16524" />
      <rdf:li rdf:resource="http://pear.php.net/bug/15463" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14542" />
      <rdf:li rdf:resource="http://pear.php.net/bug/7642" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/17290">
      <title>MDB_QueryTool: Bug 17290 [Open] MySQL AUTO_INCREMENT problems</title>
      <link>http://pear.php.net/bugs/17290</link>
      <content:encoded><![CDATA[<pre>MDB_QueryTool Bug
Reported by fludimir
2010-04-04T04:35:18+00:00
PHP: 5.2.12 OS: Windows XP SP2 Package Version: 1.2.2

Description:
------------
Cannot insert data in mysql table with auto_increment primary key. 
MDB2 version 2.4.1

Test script:
---------------
mysql&gt; describe news;
+----------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra          |
+----------+--------------+------+-----+---------+----------------+
| id       | int(11)      | NO   | PRI | NULL    | auto_increment |
| date     | date         | YES  |     | NULL    |                |
| title    | varchar(255) | YES  |     | NULL    |                |
| announce | text         | YES  |     | NULL    |                |
| text     | text         | YES  |     | NULL    |                |
+----------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)


class news extends MDB_QueryTool
{
    var $table = 'news';
    var $primaryCol = 'id';

}

$news = new news($mdb2);

$data = array(
    'date' =&gt;       '2010-04-05',
    'title' =&gt;      'test',
    'announce'  =&gt;  'test',
    'text' =&gt;       'test'
);

$id = $news-&gt;save($data);

Expected result:
----------------
Valid insertion and return inserted id

Actual result:
--------------
MDB_QueryTool 1.2.2 (current stable):
MDB2 Error: unknown error _doQuery: [Error message: Could not execute statement]
[Last executed query: INSERT INTO news (`date`, `title`, `announce`, `text`, `id`) VALUES ('2010-04-05', 'test', 'test', 'test', 'NULL')]
[Native code: 1366]
[Native message: Incorrect integer value: 'NULL' for column 'id' at row 1]

MDB_QueryTool 1.2.0 (tried a lot of earlier versions to find some working):
Valid insert and return inserted id, but instead of using MySQL AUTO_INCREMENT feature there was created news_seq sequence table, and insert query builded with col `id` and some value from sequence for this. Don't know how for another RDBMS, but as for MySQL you don't need to specify auto_increment column at all. Valid query is &quot;INSERT INTO news (`date`, `title`, `announce`, `text`) VALUES ('2010-04-05', 'test', 'test', 'test')&quot; .
I also tried version from cvs (Query.php,v 1.84 2008/07/14) and took the same result as with 1.2.0 - insertion works, but by using sequences instead of Auto_Increment</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB_QueryTool Bug
Reported by fludimir
2010-04-04T04:35:18+00:00
PHP: 5.2.12 OS: Windows XP SP2 Package Version: 1.2.2

Description:
------------
Cannot insert data in mysql table with auto_increment primary key. 
MDB2 version 2.4.1

Test script:
---------------
mysql&gt; describe news;
+----------+--------------+------+-----+---------+----------------+
| Field    | Type         | Null | Key | Default | Extra          |
+----------+--------------+------+-----+---------+----------------+
| id       | int(11)      | NO   | PRI | NULL    | auto_increment |
| date     | date         | YES  |     | NULL    |                |
| title    | varchar(255) | YES  |     | NULL    |                |
| announce | text         | YES  |     | NULL    |                |
| text     | text         | YES  |     | NULL    |                |
+----------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)


class news extends MDB_QueryTool
{
    var $table = 'news';
    var $primaryCol = 'id';

}

$news = new news($mdb2);

$data = array(
    'date' =&gt;       '2010-04-05',
    'title' =&gt;      'test',
    'announce'  =&gt;  'test',
    'text' =&gt;       'test'
);

$id = $news-&gt;save($data);

Expected result:
----------------
Valid insertion and return inserted id

Actual result:
--------------
MDB_QueryTool 1.2.2 (current stable):
MDB2 Error: unknown error _doQuery: [Error message: Could not execute statement]
[Last executed query: INSERT INTO news (`date`, `title`, `announce`, `text`, `id`) VALUES ('2010-04-05', 'test', 'test', 'test', 'NULL')]
[Native code: 1366]
[Native message: Incorrect integer value: 'NULL' for column 'id' at row 1]

MDB_QueryTool 1.2.0 (tried a lot of earlier versions to find some working):
Valid insert and return inserted id, but instead of using MySQL AUTO_INCREMENT feature there was created news_seq sequence table, and insert query builded with col `id` and some value from sequence for this. Don't know how for another RDBMS, but as for MySQL you don't need to specify auto_increment column at all. Valid query is &quot;INSERT INTO news (`date`, `title`, `announce`, `text`) VALUES ('2010-04-05', 'test', 'test', 'test')&quot; .
I also tried version from cvs (Query.php,v 1.84 2008/07/14) and took the same result as with 1.2.0 - insertion works, but by using sequences instead of Auto_Increment</pre>]]></description>
      <dc:date>2010-04-04T04:35:18+00:00</dc:date>
      <dc:creator>fludimir &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB_QueryTool Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/16524">
      <title>MDB_QueryTool: Bug 16524 [Open] Query.add() returns 'NULL' i.o inserted id for MDB2+autoincrement</title>
      <link>http://pear.php.net/bugs/16524</link>
      <content:encoded><![CDATA[<pre>MDB_QueryTool Bug
Reported by marvin_x
2009-08-15T03:37:52+00:00
PHP: 5.3.0 OS: Windows XP SP3 Package Version: 1.2.2

Description:
------------
Query-&gt;add() does not return the last inserted id, if we use MDB2 AND if we have an autoincrement supporting database / table. Instead add() returns 'NULL' (even with succesful insertion)
The add() function is supposed to figure out an id and return that id.  For MDB this works, since the id is figured out before the query. For MDB2 this is different.
The MDB2_Extended.beforeID() function is called, which , if auto-increment is supported, returns $id == 'NULL' to be put into the query, which works fine on execution.
After the execution nothing happens, and the id remains 'NULL' . A suggested fix is included in the files. It calls MDB2's AfterId function.</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB_QueryTool Bug
Reported by marvin_x
2009-08-15T03:37:52+00:00
PHP: 5.3.0 OS: Windows XP SP3 Package Version: 1.2.2

Description:
------------
Query-&gt;add() does not return the last inserted id, if we use MDB2 AND if we have an autoincrement supporting database / table. Instead add() returns 'NULL' (even with succesful insertion)
The add() function is supposed to figure out an id and return that id.  For MDB this works, since the id is figured out before the query. For MDB2 this is different.
The MDB2_Extended.beforeID() function is called, which , if auto-increment is supported, returns $id == 'NULL' to be put into the query, which works fine on execution.
After the execution nothing happens, and the id remains 'NULL' . A suggested fix is included in the files. It calls MDB2's AfterId function.</pre>]]></description>
      <dc:date>2009-08-15T03:49:16+00:00</dc:date>
      <dc:creator>gonz000 &amp;#x61;&amp;#116; hotmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB_QueryTool Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/15463">
      <title>MDB_QueryTool: Bug 15463 [Open] Broken SELECT</title>
      <link>http://pear.php.net/bugs/15463</link>
      <content:encoded><![CDATA[<pre>MDB_QueryTool Bug
Reported by mpgjunky
2008-12-30T22:25:32+00:00
PHP: 5.1.6 OS: Fedora 6 Package Version: 1.2.2

Description:
------------
I get a broken select when I use left joins and multiple tables. The code is show below:

    $ticket = new Ticket($dsn, null, 2);
    $ticket-&gt;useResult('object');
    $ticket-&gt;setSelect(&quot;client_tickets.*, users_table.*,prices.*, displaytext, count(wp.user_id) as wnp, count(pp.user_id) as
 pnp&quot;);
    $ticket-&gt;addLeftJoin(&quot;users_table&quot;, &quot;users_table.userid = client_tickets.userid&quot;);
    $ticket-&gt;addLeftJoin(&quot;prices&quot;, &quot;users_table.acc_type = prices.acc_type&quot;);
    $ticket-&gt;addLeftJoin(&quot;payment_worldpay as wp&quot;, &quot;users_table.userid = wp.user_id&quot;);
    $ticket-&gt;addLeftJoin(&quot;paypal_payments as pp&quot;, &quot;users_table.userid = pp.user_id&quot;);
    $ticket-&gt;setGroup(&quot;userid&quot;);
    $trec = $ticket-&gt;get($id)-&gt;fetchRow();

See actual result for sql statement.

There are in fact two problems (if I am not wrong):

1. Spaces in front of 'table.*'
2. Column prefixing statement in Query.php line 2097, _buildSelect() function (which also affects returned result as object).

I fixed the problems by:

1. Add: $tables = array_map('trim', $tables) after the tables have been extracted into $tables.
2. Modify line 2097 from:
$cols[$aTable][] = $aTable. '.' .$colName . ' AS '. $this-&gt;_quoteIdentifier('_'. $this-&gt;getTableShortName($aTable) .'_'. $colName);

TO 
$cols[$aTable][] = $aTable. '.' .$colName . ' AS '. $this-&gt;_quoteIdentifier($this-&gt;getTableShortName($aTable) .'_'. $colName);

I am not sure if the problems I experienced are a result of me not using the class properly or not. If this is the case please let me know.

Cheers,
Michael.

Expected result:
----------------
A proper SQL statement, even if column names are being prefixed with table name as show below:

SELECT client_tickets.`id` AS `id`,client_tickets.`id_cat` AS `id_cat`,client_tickets.`description` AS `description`,client_tickets.`status` AS `status`,client_tickets.`userid` AS `userid`,client_tickets.`adate` AS `adate`,client_tickets.`t_status` AS `t_status`,users_table.`id_users_table` AS `users_id_users_table`,users_table.`name` AS `users_name`,users_table.`address` AS `users_address`,users_table.`town` AS `users_town`,users_table.`country` AS `users_country`,users_table.`email` AS `users_email`,users_table.`zipcode` AS `users_zipcode`,users_table.`userid` AS `users_userid`,users_table.`pwd` AS `users_pwd`,users_table.`sex` AS `users_sex`,users_table.`birth_date` AS `users_birth_date`,users_table.`acc_type` AS `users_acc_type`,users_table.`status` AS `users_status`,users_table.`creation_date` AS `users_creation_date`,users_table.`hash` AS `users_hash`,users_table.`recurr` AS `users_recurr`,users_table.`referral` AS `users_referral`,users_table.`activated` AS `users_activated`,users_table.`expiry` AS `users_expiry`,users_table.`friend` AS `users_friend`,users_table.`comments` AS `users_comments`,users_table.`dutch_id` AS `users_dutch_id`,users_table.`remote_addr` AS `users_remote_addr`,users_table.`period` AS `users_period`,prices.`id` AS `prices_id`,prices.`acc_type` AS `prices_acc_type`,prices.`price` AS `prices_price`,prices.`d_price` AS `prices_d_price`,prices.`currency` AS `prices_currency`,prices.`enabled` AS `prices_enabled`,prices.`display` AS `prices_display`,prices.`displaytext` AS `prices_displaytext`,prices.`displayto` AS `prices_displayto`,prices.`type` AS `prices_type`,prices.`ns_type` AS `prices_ns_type`,prices.`days` AS `prices_days`,`displaytext`,count(wp.user_id) AS `wnp`,count(pp.user_id) AS `pnp` FROM `client_tickets` LEFT JOIN users_table ON users_table.userid = client_tickets.userid LEFT JOIN prices ON users_table.acc_type = prices.acc_type LEFT JOIN payment_worldpay as wp ON users_table.userid = wp.user_id LEFT JOIN paypal_payments as pp ON users_table.userid = pp.user_id GROUP BY client_tickets.userid


Actual result:
--------------
SELECT client_tickets.`id` AS `id`,client_tickets.`id_cat` AS `id_cat`,client_tickets.`description` AS `description`,client_tickets.`status` AS `status`,client_tickets.`userid` AS `userid`,client_tickets.`adate` AS `adate`,client_tickets.`t_status` AS `t_status`,users_table.`id_users_table` AS `_table_id_users_table`,users_table.`name` AS `_table_name`,users_table.`address` AS `_table_address`,users_table.`town` AS `_table_town`,users_table.`country` AS `_table_country`,users_table.`email` AS `_table_email`,users_table.`zipcode` AS `_table_zipcode`,users_table.`userid` AS `_table_userid`,users_table.`pwd` AS `_table_pwd`,users_table.`sex` AS `_table_sex`,users_table.`birth_date` AS `_table_birth_date`,users_table.`acc_type` AS `_table_acc_type`,users_table.`status` AS `_table_status`,users_table.`creation_date` AS `_table_creation_date`,users_table.`hash` AS `_table_hash`,users_table.`recurr` AS `_table_recurr`,users_table.`referral` AS `_table_referral`,users_table.`activated` AS `_table_activated`,users_table.`expiry` AS `_table_expiry`,users_table.`friend` AS `_table_friend`,users_table.`comments` AS `_table_comments`,users_table.`dutch_id` AS `_table_dutch_id`,users_table.`remote_addr` AS `_table_remote_addr`,users_table.`period` AS `_table_period`,prices.`id` AS `_prices_id`,prices.`acc_type` AS `_prices_acc_type`,prices.`price` AS `_prices_price`,prices.`d_price` AS `_prices_d_price`,prices.`currency` AS `_prices_currency`,prices.`enabled` AS `_prices_enabled`,prices.`display` AS `_prices_display`,prices.`displaytext` AS `_prices_displaytext`,prices.`displayto` AS `_prices_displayto`,prices.`type` AS `_prices_type`,prices.`ns_type` AS `_prices_ns_type`,prices.`days` AS `_prices_days`,`displaytext`,count(wp.user_id) AS `wnp`,count(pp.user_id) AS `pnp` FROM `client_tickets` LEFT JOIN users_table ON users_table.userid = client_tickets.userid LEFT JOIN prices ON users_table.acc_type = prices.acc_type LEFT JOIN payment_worldpay as wp ON users_table.userid = wp.user_id LEFT JOIN paypal_payments as pp ON users_table.userid = pp.user_id GROUP BY client_tickets.userid</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB_QueryTool Bug
Reported by mpgjunky
2008-12-30T22:25:32+00:00
PHP: 5.1.6 OS: Fedora 6 Package Version: 1.2.2

Description:
------------
I get a broken select when I use left joins and multiple tables. The code is show below:

    $ticket = new Ticket($dsn, null, 2);
    $ticket-&gt;useResult('object');
    $ticket-&gt;setSelect(&quot;client_tickets.*, users_table.*,prices.*, displaytext, count(wp.user_id) as wnp, count(pp.user_id) as
 pnp&quot;);
    $ticket-&gt;addLeftJoin(&quot;users_table&quot;, &quot;users_table.userid = client_tickets.userid&quot;);
    $ticket-&gt;addLeftJoin(&quot;prices&quot;, &quot;users_table.acc_type = prices.acc_type&quot;);
    $ticket-&gt;addLeftJoin(&quot;payment_worldpay as wp&quot;, &quot;users_table.userid = wp.user_id&quot;);
    $ticket-&gt;addLeftJoin(&quot;paypal_payments as pp&quot;, &quot;users_table.userid = pp.user_id&quot;);
    $ticket-&gt;setGroup(&quot;userid&quot;);
    $trec = $ticket-&gt;get($id)-&gt;fetchRow();

See actual result for sql statement.

There are in fact two problems (if I am not wrong):

1. Spaces in front of 'table.*'
2. Column prefixing statement in Query.php line 2097, _buildSelect() function (which also affects returned result as object).

I fixed the problems by:

1. Add: $tables = array_map('trim', $tables) after the tables have been extracted into $tables.
2. Modify line 2097 from:
$cols[$aTable][] = $aTable. '.' .$colName . ' AS '. $this-&gt;_quoteIdentifier('_'. $this-&gt;getTableShortName($aTable) .'_'. $colName);

TO 
$cols[$aTable][] = $aTable. '.' .$colName . ' AS '. $this-&gt;_quoteIdentifier($this-&gt;getTableShortName($aTable) .'_'. $colName);

I am not sure if the problems I experienced are a result of me not using the class properly or not. If this is the case please let me know.

Cheers,
Michael.

Expected result:
----------------
A proper SQL statement, even if column names are being prefixed with table name as show below:

SELECT client_tickets.`id` AS `id`,client_tickets.`id_cat` AS `id_cat`,client_tickets.`description` AS `description`,client_tickets.`status` AS `status`,client_tickets.`userid` AS `userid`,client_tickets.`adate` AS `adate`,client_tickets.`t_status` AS `t_status`,users_table.`id_users_table` AS `users_id_users_table`,users_table.`name` AS `users_name`,users_table.`address` AS `users_address`,users_table.`town` AS `users_town`,users_table.`country` AS `users_country`,users_table.`email` AS `users_email`,users_table.`zipcode` AS `users_zipcode`,users_table.`userid` AS `users_userid`,users_table.`pwd` AS `users_pwd`,users_table.`sex` AS `users_sex`,users_table.`birth_date` AS `users_birth_date`,users_table.`acc_type` AS `users_acc_type`,users_table.`status` AS `users_status`,users_table.`creation_date` AS `users_creation_date`,users_table.`hash` AS `users_hash`,users_table.`recurr` AS `users_recurr`,users_table.`referral` AS `users_referral`,users_table.`activated` AS `users_activated`,users_table.`expiry` AS `users_expiry`,users_table.`friend` AS `users_friend`,users_table.`comments` AS `users_comments`,users_table.`dutch_id` AS `users_dutch_id`,users_table.`remote_addr` AS `users_remote_addr`,users_table.`period` AS `users_period`,prices.`id` AS `prices_id`,prices.`acc_type` AS `prices_acc_type`,prices.`price` AS `prices_price`,prices.`d_price` AS `prices_d_price`,prices.`currency` AS `prices_currency`,prices.`enabled` AS `prices_enabled`,prices.`display` AS `prices_display`,prices.`displaytext` AS `prices_displaytext`,prices.`displayto` AS `prices_displayto`,prices.`type` AS `prices_type`,prices.`ns_type` AS `prices_ns_type`,prices.`days` AS `prices_days`,`displaytext`,count(wp.user_id) AS `wnp`,count(pp.user_id) AS `pnp` FROM `client_tickets` LEFT JOIN users_table ON users_table.userid = client_tickets.userid LEFT JOIN prices ON users_table.acc_type = prices.acc_type LEFT JOIN payment_worldpay as wp ON users_table.userid = wp.user_id LEFT JOIN paypal_payments as pp ON users_table.userid = pp.user_id GROUP BY client_tickets.userid


Actual result:
--------------
SELECT client_tickets.`id` AS `id`,client_tickets.`id_cat` AS `id_cat`,client_tickets.`description` AS `description`,client_tickets.`status` AS `status`,client_tickets.`userid` AS `userid`,client_tickets.`adate` AS `adate`,client_tickets.`t_status` AS `t_status`,users_table.`id_users_table` AS `_table_id_users_table`,users_table.`name` AS `_table_name`,users_table.`address` AS `_table_address`,users_table.`town` AS `_table_town`,users_table.`country` AS `_table_country`,users_table.`email` AS `_table_email`,users_table.`zipcode` AS `_table_zipcode`,users_table.`userid` AS `_table_userid`,users_table.`pwd` AS `_table_pwd`,users_table.`sex` AS `_table_sex`,users_table.`birth_date` AS `_table_birth_date`,users_table.`acc_type` AS `_table_acc_type`,users_table.`status` AS `_table_status`,users_table.`creation_date` AS `_table_creation_date`,users_table.`hash` AS `_table_hash`,users_table.`recurr` AS `_table_recurr`,users_table.`referral` AS `_table_referral`,users_table.`activated` AS `_table_activated`,users_table.`expiry` AS `_table_expiry`,users_table.`friend` AS `_table_friend`,users_table.`comments` AS `_table_comments`,users_table.`dutch_id` AS `_table_dutch_id`,users_table.`remote_addr` AS `_table_remote_addr`,users_table.`period` AS `_table_period`,prices.`id` AS `_prices_id`,prices.`acc_type` AS `_prices_acc_type`,prices.`price` AS `_prices_price`,prices.`d_price` AS `_prices_d_price`,prices.`currency` AS `_prices_currency`,prices.`enabled` AS `_prices_enabled`,prices.`display` AS `_prices_display`,prices.`displaytext` AS `_prices_displaytext`,prices.`displayto` AS `_prices_displayto`,prices.`type` AS `_prices_type`,prices.`ns_type` AS `_prices_ns_type`,prices.`days` AS `_prices_days`,`displaytext`,count(wp.user_id) AS `wnp`,count(pp.user_id) AS `pnp` FROM `client_tickets` LEFT JOIN users_table ON users_table.userid = client_tickets.userid LEFT JOIN prices ON users_table.acc_type = prices.acc_type LEFT JOIN payment_worldpay as wp ON users_table.userid = wp.user_id LEFT JOIN paypal_payments as pp ON users_table.userid = pp.user_id GROUP BY client_tickets.userid</pre>]]></description>
      <dc:date>2008-12-30T22:25:32+00:00</dc:date>
      <dc:creator>michael &amp;#x61;&amp;#116; stellarent &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB_QueryTool Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14542">
      <title>MDB_QueryTool: Bug 14542 [Open] Problem with join if field is underscore separated</title>
      <link>http://pear.php.net/bugs/14542</link>
      <content:encoded><![CDATA[<pre>MDB_QueryTool Bug
Reported by gumigutas
2008-08-22T10:49:31+00:00
PHP: 5.2.5 OS: Linux Package Version: 1.2.2

Description:
------------
$this-&gt;addJoin($this-&gt;tableA, &quot;{$this-&gt;table}.account_trans_id={$this-&gt;tableA}.id&quot;);

field &quot;account_trans_id&quot; converts into &quot;accounttrans.id&quot;</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB_QueryTool Bug
Reported by gumigutas
2008-08-22T10:49:31+00:00
PHP: 5.2.5 OS: Linux Package Version: 1.2.2

Description:
------------
$this-&gt;addJoin($this-&gt;tableA, &quot;{$this-&gt;table}.account_trans_id={$this-&gt;tableA}.id&quot;);

field &quot;account_trans_id&quot; converts into &quot;accounttrans.id&quot;</pre>]]></description>
      <dc:date>2008-08-22T10:49:31+00:00</dc:date>
      <dc:creator>adomas &amp;#x64;&amp;#111;&amp;#x74; rimeika &amp;#x61;&amp;#116; gmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB_QueryTool Bug</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/7642">
      <title>MDB_QueryTool: Feature/Change Request 7642 [Open] Data type abstraction layer does not work not fetched results</title>
      <link>http://pear.php.net/bugs/7642</link>
      <content:encoded><![CDATA[<pre>MDB_QueryTool Feature/Change Request
Reported by christian_rocher@...
2006-05-16T17:14:37+00:00
PHP: 4.3.10 OS: Windows XP SP2 Package Version: 

Description:
------------
Hi,

I use MDB2-2.0.1 with MDB2_Driver_mysql-1.0.1, MDB2_Driver_pgsql-1.0.0 and MDB_QueryTool-1.1.1 to connect to my databases (MySQL and Posgres).

The Data type abstraction layer works fine. But fetched records (QueryTool-&gt;getAll()) returns data in the database format. For example: a boolean is 0 or 1 for mysql and &quot;f&quot; or &quot;t&quot; for posgres.



Test script:
---------------
$this-&gt;QueryTool-&gt;reset();
$this-&gt;QueryTool-&gt;AddOrder( $this-&gt;QueryTool-&gt;primaryCol);
$this-&gt;QueryTool-&gt;getAll();


Expected result:
----------------
the bolean values are converted to 0 or 1

Actual result:
--------------
a boolean result is 0 or 1 for mysql and &quot;f&quot; or &quot;t&quot; for posgres.</pre>]]></content:encoded>
      <description><![CDATA[<pre>MDB_QueryTool Feature/Change Request
Reported by christian_rocher@...
2006-05-16T17:14:37+00:00
PHP: 4.3.10 OS: Windows XP SP2 Package Version: 

Description:
------------
Hi,

I use MDB2-2.0.1 with MDB2_Driver_mysql-1.0.1, MDB2_Driver_pgsql-1.0.0 and MDB_QueryTool-1.1.1 to connect to my databases (MySQL and Posgres).

The Data type abstraction layer works fine. But fetched records (QueryTool-&gt;getAll()) returns data in the database format. For example: a boolean is 0 or 1 for mysql and &quot;f&quot; or &quot;t&quot; for posgres.



Test script:
---------------
$this-&gt;QueryTool-&gt;reset();
$this-&gt;QueryTool-&gt;AddOrder( $this-&gt;QueryTool-&gt;primaryCol);
$this-&gt;QueryTool-&gt;getAll();


Expected result:
----------------
the bolean values are converted to 0 or 1

Actual result:
--------------
a boolean result is 0 or 1 for mysql and &quot;f&quot; or &quot;t&quot; for posgres.</pre>]]></description>
      <dc:date>2006-05-16T17:44:09+00:00</dc:date>
      <dc:creator>christian_rocher &amp;#x61;&amp;#116; hotmail &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>MDB_QueryTool Feature/Change Request</dc:subject>
    </item>
</rdf:RDF>
