Welcome Guest, Not a member yet? Register   Sign In
need a clarification

(09-07-2018, 07:17 AM)Wouter60 Wrote: Just wondering: why do you keep pasting your php code and html as plain text in this forum?
On the toolbar of the editor, you have buttons for Code and for PHP. They surround your code by tags that make code much better readable. Please, use this buttons from now on.

About your code.
Your model returns true or false.
Your controller seems to be expecting a numeric value ( >= 1 ).

PHP Code:

PHP Code:
if ($result //which is short for: if ($result == TRUE) 

Your model can be more efficient:
PHP Code:
if ($query->num_rows()>0){
  return true;
else {
  return false;
return ($query->num_rows() > 0) ;  //this wil return true if num_rows() is > 0, or false if it's not. 

It 's working . thanks a lot .

Messages In This Thread
need a clarification - by kvanaraj - 09-07-2018, 06:20 AM
RE: need a clarification - by Wouter60 - 09-07-2018, 07:17 AM
RE: need a clarification - by kvanaraj - 09-07-2018, 11:09 PM

Theme © iAndrew 2016 - Forum software by © MyBB