Welcome Guest, Not a member yet? Register   Sign In
Query error in Model
#3

I think there's an error in the query builder command. So $query is probably FALSE instead of an object.
Are you sure the table name is 'cultured_codeignite' ? No 'r' missing at the end?

If you've corrected that, you can return TRUE or FALSE like this:
PHP Code:
Return ($query->num_rows() == 1); 
So you don't need if .. else for that. The return value is either TRUE or FALSE.
Reply


Messages In This Thread
Query error in Model - by Mekaboo - 05-12-2019, 08:26 PM
RE: Query error in Model - by InsiteFX - 05-13-2019, 03:03 AM
RE: Query error in Model - by Mekaboo - 05-13-2019, 11:32 AM
RE: Query error in Model - by Wouter60 - 05-13-2019, 08:05 AM
RE: Query error in Model - by Mekaboo - 05-13-2019, 01:01 PM
RE: Query error in Model - by Wouter60 - 05-13-2019, 01:37 PM
RE: Query error in Model - by Mekaboo - 05-13-2019, 04:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB