Welcome Guest, Not a member yet? Register   Sign In
query->num_rows versus query->num_rows()
#1

This has bitten me in the rear end a few times, and tonight it happened again.

In CI 2.X you could use this:


Code:
if( $query->num_rows > 0 ) // Notice not a method


In CI 3.X this you must have the parenthesis:


Code:
if( $query->num_rows() > 0 )

I lost a lot of money with the issue I fixed tonight, so just want to make sure it doesn't happen to anyone else.
Reply
#2

Thanks for sharing. Big fan of your Auth add-on Smile
Reply
#3

(05-19-2016, 06:51 PM)BamaStangGuy Wrote: Thanks for sharing. Big fan of your Auth add-on Smile

That's good to know. Sometimes I wonder if people are using it because I don't get a lot of feedback.
Reply
#4

(05-19-2016, 08:25 PM)skunkbad Wrote:
(05-19-2016, 06:51 PM)BamaStangGuy Wrote: Thanks for sharing. Big fan of your Auth add-on Smile

That's good to know. Sometimes I wonder if people are using it because I don't get a lot of feedback.

Nothing to really provide. Everything is working great. :Smile Simple and easy to build around.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB