#6017: Can't select all rows in a oracle DB
------------------------------+---------------------------------------------
   Reporter:  CristianDeluxe  |          Owner:  phishy                         
   
       Type:  Bug             |         Status:  new                            
   
   Priority:  Medium          |      Milestone:  1.2.x.x                        
   
  Component:  Oracle          |        Version:  1.2 Final                      
   
   Severity:  Normal          |       Keywords:  oracle undefined offset 
dbo_oracle
Php_version:  PHP 5           |   Cake_version:                                 
   
------------------------------+---------------------------------------------
 Hi, first sorry for my bad English.
 I’m using last version of CakePHP (1.2.1.8004).

 == What I did: ==

 I have this query on my controller:

 {{{
 function facturas() {
         $this->set('facturas', $this->Portal->query('SELECT * FROM
 MI_FACTURA where rownum <= 2'));
 }
 }}}

 And my database.php are configured on this way:

 {{{
 var $default = array(
         'driver' => 'oracle',
                 'persistent' => false,
                 'host' => '',
                 //'port' => 1521,
                 'login' => 'myuser',
                 'password' => 'mypassword',
                 'database' => '192.168.0.10:1521',
         );
 }}}

 == What I expected to happen: ==

 I expected an array with 2 records

 == Why it didn't meet my expectations: ==


 If I do this query in my own script, using only oci_connect, oci_parse,
 oci_execute and oci_fetch_assoc, it works ok, show me 2 records of this
 table.




 With CakePHP: it do the query:

 {{{
 SELECT * FROM MI_FACTURA where rownum <= 2
 }}}

 But show me this error (repeated 41 times):

 {{{
 Notice (8): Undefined offset:  1
 [CORE\cake\libs\model\datasources\dbo\dbo_oracle.php, line 380]
 }}}

 And returns me this array:

 {{{
 Array
 (
     [0] => Array
         (
             [0] => Array
                 (
                     [*] => 952842
                 )

             [] => Array
                 (
                     [] => 0
                 )

         )

     [1] => Array
         (
             [0] => Array
                 (
                     [*] => 952844
                 )

             [] => Array
                 (
                     [] => 0
                 )

         )

 )
 }}}

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6017>
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 tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
tickets-cakephp+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to