#5730: dbo_odbc lastNumRows(...) problems with efficiency
-----------------------------------------------------+----------------------
Reporter: lecterror | Owner:
Type: Enhancement | Status: new
Priority: High | Milestone: 1.2.x.x
Component: ODBC | Version: RC3
Severity: Normal | Resolution:
Keywords: odbc datasource rowcount lastnumrows | Php_version: n/a
Cake_version: |
-----------------------------------------------------+----------------------
Comment (by lecterror):
Hmm..maybe I wasn't clear enough.
Yes, odbc_num_rows() may or may not return a number of rows, but
odbc_fetch_into() is used incorrectly in lastNumRows().
PHP docs clearly state for odbc_fetch_into:
{{{
Fetch one result row into array.
}}}
I don't see any while loops in lastNumRows(...), so obviously the line
"return count($results);" returns the number of ''columns'' in a
''single'' row of the result set.
If you look up odbc_fetch_into() on Google code search you can see that
this function is normally called in such functions as FetchNextRow() etc..
Unfortunately I don't have the time to write a test case, but I'm sure you
can see the problem just by looking at the code.
--
Ticket URL: <https://trac.cakephp.org/ticket/5730#comment:2>
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
-~----------~----~----~----~------~----~------~--~---