Query returns nothing.... [SOLVED] - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Query returns nothing.... [SOLVED] (/showthread.php?tid=10570) |
Query returns nothing.... [SOLVED] - El Forum - 08-05-2008 [eluser]Frychiko[/eluser] I have a query to get a row from a table, to extract a row with a field = "Accessories - Mouse" Code: $this->db->select("*, merchant.name as merchant, ".$this->table.".id as id, category.name as category"); Which converts to this, as tested in phpmyadmin: Code: SELECT * , merchant.name AS merchant, merchant_category.id AS id, category.name AS category CI returns nothing: Code: echo "search results:".$query->num_rows(); but, phpmyadmin returns a row, which should be the correct result: Quote:Showing rows 0 - 0 (1 total, Query took 0.0008 sec) What is going on here? It's driving me insane Query returns nothing.... [SOLVED] - El Forum - 08-05-2008 [eluser]Michael Wales[/eluser] Be sure ActiveRecord is piecing your query together properly: Code: $this->output->enable_profiler(TRUE); Query returns nothing.... [SOLVED] - El Forum - 08-05-2008 [eluser]Frychiko[/eluser] Cheers, Michael.. that helped! turned out to be different! |