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

(05-13-2019, 08:05 AM)Wouter60 Wrote: 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.

Hey I found the mistake (stupid me Tongue ): I named the DB and table the same thing. I created a new table but now getting this error in regards to sessions:

Severity: Warning
Message: session_start(): Cannot send session cache limiter - headers already sent (output started at /home4/cultured/public_html/application/controllers/Main.php:1)
Filename: Session/Session.php
Line Number: 143
Backtrace:
File: /home4/cultured/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered
Severity: Warning
Message: session_regenerate_id(): Cannot regenerate session id - headers already sent
Filename: Session/Session.php
Line Number: 718
Backtrace:
File: /home4/cultured/public_html/index.php
Line: 315
Function: require_once
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