Welcome Guest, Not a member yet? Register   Sign In
Pagination problems
#10

[eluser]buckboru[/eluser]
Let me run this by you as i've been debugging and debugging trying to make heads or tails of the problem.

In my db2c.driver.php
Count_all()
Code:
function count_all($table = '')
    {
        if ($table == '') {
            return '0';
        }

        $query = $this->query("SELECT COUNT(*) AS numrows FROM " . $this->dbprefix.$table );
        //$query = $this->query("SELECT COUNT(*) AS numrows FROM `" . $this->dbprefix.$table . "`");
        if ($query->num_rows() == 0) {
            return '0';
        }

        $row = $query->row();

        return $row->numrows;
    }
When i run debug $row shows as an object of stdClass- Inside of that i see NUMROWS with a value of 24(24 is the number of records in my database file) So these means it is actually executing the query and getting results.
However it blows on the next line return$row->numrows with a message of
Undefined property: stdClass::$numrows

any thoughts or guidance as to what to look for.


Messages In This Thread
Pagination problems - by El Forum - 08-29-2008, 10:29 AM
Pagination problems - by El Forum - 08-29-2008, 10:36 AM
Pagination problems - by El Forum - 08-29-2008, 10:39 AM
Pagination problems - by El Forum - 08-29-2008, 10:45 AM
Pagination problems - by El Forum - 08-29-2008, 11:31 AM
Pagination problems - by El Forum - 08-29-2008, 11:42 AM
Pagination problems - by El Forum - 08-29-2008, 11:45 AM
Pagination problems - by El Forum - 08-29-2008, 11:54 AM
Pagination problems - by El Forum - 08-29-2008, 12:02 PM
Pagination problems - by El Forum - 08-29-2008, 01:31 PM
Pagination problems - by El Forum - 08-29-2008, 02:31 PM
Pagination problems - by El Forum - 09-03-2008, 07:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB