Welcome Guest, Not a member yet? Register   Sign In
Query not showing all the rows
#2

(This post was last modified: 09-23-2015, 07:26 AM by DEV03-ROMAIN.)

(09-22-2015, 10:57 PM)gepd Wrote: Hi, I'm using the last current version of C.I, and I having a wierd problem with a query.

I'm doing this query:



PHP Code:
public function get_event(){
 
$query $this->db->query("SELECT id,date_register FROM log_event ORDER BY id DESC");
 return 
$query->num_rows();


it show me "72" but in the table log_event I have 172 rows

if I paste the same query in MYSQL Workbench, it shows me 172 rows, what I'm doing wrong?
is there some limit in the C.I queries?

you could try this instead of num_rows()



PHP Code:
count_all_results(); 
Edit :
Quote:it show me "72" but in the table log_event I have 172 rows

looks like you just missing the " 1" ... maybe variable type problems. Can we see full code of your problem ?  
Reply


Messages In This Thread
Query not showing all the rows - by gepd - 09-22-2015, 10:57 PM
RE: Query not showing all the rows - by DEV03-ROMAIN - 09-23-2015, 07:22 AM
RE: Query not showing all the rows - by gepd - 09-23-2015, 11:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB