Welcome Guest, Not a member yet? Register   Sign In
Database query in a controller method?
#2

What you did works perfectly fine. If you just need it in the one method, though, no need to set it at the class level.

Code:
$db = db_connect();
$query = $db->query('SELECT name, title, email FROM my_table');
Reply


Messages In This Thread
RE: Database query in a controller method? - by kilishan - 03-07-2019, 06:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB