Welcome Guest, Not a member yet? Register   Sign In
Multiple Queries
#2

[eluser]Charles Garrison[/eluser]
My understanding of the MVC design would indicate that you do not want to do the processing in the view. I would probably build the html table in the controller and pass the it to the view as a string.

A couple of other suggestions:
- The "print" keyword is a bit slower than "echo" because it returns a value, FYI.
- It's a good idea to test your query results like this:
Code:
if ($query->num_rows() > 0) {
    foreach ($query->result() as $row) {
        //statements here...
    }
}

else {
    //statements here...
}


Messages In This Thread
Multiple Queries - by El Forum - 05-04-2009, 08:41 AM
Multiple Queries - by El Forum - 05-04-2009, 05:07 PM
Multiple Queries - by El Forum - 05-04-2009, 07:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB