Query not showing all the rows |
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(){ 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?
(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. you could try this instead of num_rows() PHP Code: count_all_results(); 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 ?
Thanks for your answer DEV03-ROMAIN, I already tried with with something else than
Code: num_rows() but it's the same result there is the full code: Model Code: <?php and this is the controller Code: <?php I know there is an error, be cause I can see only 72 rows, and I already check the db, the data is there.
I would start by breaking down your query to see if you get different results.
PHP Code: $this->db->query("SELECT * FROM log_event"); // Start here and keep building up to what you want
(09-23-2015, 11:02 AM)gepd Wrote: Thanks for your answer DEV03-ROMAIN, I already tried with with something else than hmmm, your code seems to be ok for me. Do you have the 172 rows in $json["datails"] ? Did you try doing echo $query -> num_rows(); just after $query -> result(); |
Welcome Guest, Not a member yet? Register Sign In |