#6210: model->query with MSSQL results in a malformed array
------------------------------------------------------------+---------------
    Reporter:  c_schmitz                                    |          Type:  
Bug     
      Status:  new                                          |      Priority:  
High    
   Milestone:  1.2.x.x                                      |     Component:  
MSSQL   
     Version:  1.2 Final                                    |      Severity:  
Critical
    Keywords:  mssq c_schmitz query                         |   Php_version:  
PHP 5   
Cake_version:  Tested with latest stable und latest branch  |  
------------------------------------------------------------+---------------
 When running a query like this[[BR]]

 {{{
 $result=$this->query('select a.*, b.* from table1 as a, table2 as b where
 table1.table_id=table2.id')
 }}}

 Expected result:


 {{{
 array(
 [0]
   [table1]
      [id]=>'1'
      [data1]=>'data1'
      [data2]=>'data2'
      [data3]=>'data3')
   [table2]
      [id]=>'2'
      [data1]=>'data4'
      [data2]=>'data5'
      [data3]=>'data6')
 [1]
   [table1]
      [id]=>'2'
 .
 .
 .
 }}}

 Current result:

 {{{
 array(
 [0]
   [0]
      [id]=>'1'
      [data1]=>'data1'
      [data2]=>'data2'
      [data3]=>'data3')
      [data4]=>'data4'
      [data5]=>'data5'
      [data6]=>'data6')
 [1]
   [0]
      [id]=>'2'
 .
 .
 .
 }}}

 Notice that the two tables are collapsed into one array. Fields with the
 same name are disappearing!

 This makes the query command essentially useless on MSSQL and in addition
 it is not portable between MSSQL and MYSQL.
 [[BR]]

 Thank for taking a look at this and thank you for an otherwise great
 product!

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6210>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to