Re: [PHP] Call to undefined method on class property!?

2010-01-07 Thread Darren Karstens
Do you have a method in your Database class called affected_rows() ? From the code you have shown you only have a member variable called affected_rows and so your call $db-fetch_array($result) is falling over. On Thu, Jan 7, 2010 at 8:47 AM, Allen McCabe allenmcc...@gmail.com wrote: I have a

Re: [PHP] Call to undefined method on class property!?

2010-01-07 Thread Thijs Lensselink
Allen McCabe wrote: I have a singleton database object in a global file at the top of my document. In most other locations I am able to access it just fine, however in my footer I want to loop through a properties list for links (I am saving links to a database, each with its own properties).

Re: [PHP] Call to undefined method on class property!? - [CLOSED]

2010-01-07 Thread Allen McCabe
I caught that error, but the line number was referring to the assignment, it didn't even get to the obvious error. Why would $total = $db-affected_rows, (assigning the value of $affected_rows to $total) be interpreted as a method call? I have since defined a num_rows() method (using