• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error due to code in Form Vaildation.php

#1
Hello!

Ive looked and looked but cant seem to find how to correct issue that comes with this line of code:

 return $query->num_rows() === 0;

Ive seen various ways to correct but dont know which is right. I may have asked of this before or not but if I did please forgive me. Im trying to correct this code because its messing  everything else up Sad  Can  someone help, THANK YOU!!!

Heart Heart ,
Mekaboo
Reply

#2
We need more information then just that.

What error are you getting?

Show the code that is generating the error.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(05-18-2019, 04:34 AM)InsiteFX Wrote: We need more information then just that.

What error are you getting?

Show the code that is generating the error.

This was my original error:

Fatal error: Call to a member function num_rows() on a non-object in /home4/cultured/public_html/system/libraries/Form_validation.php on line 1122

I thought it was because I didnt have a form vaidation in my library folder. After making one it messed up my login so I took it out. Now I still get this error after trying to test register. How do I fix this? I thought I added the proper links within my autoload and config files, I guess I missing something else. Thank you for the help Smile
Reply

#4
@Mekaboo,
Try this instead:

Return ($query->num_rows() === 0)? 0 : $query->num_rows();

Also, you might want to see what value $query->num_rows() is putting out. Do an echo statement. Also, Xdebug might be helpful as well.
Reply

#5
(05-18-2019, 03:00 PM)php_rocs Wrote: @Mekaboo,
Try this instead:

   Return ($query->num_rows() === 0)? 0 : $query->num_rows();

Also, you might want to see what value $query->num_rows() is putting out. Do an echo statement.  Also, Xdebug might be helpful as well.

Thank you so very much Smile
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.