-
Couldn't load subscription status.
- Fork 28
Open
Description
You can use it like code:
module app.controller.IndexController;
import hunt.framework;
class IndexController : Controller
{
mixin MakeController;
@Action
string index()
{
auto connection = app().database().getConnection();
auto stmt = conn.createStatement();
stmt.prepare("SELECT * FROM user WHERE username = :username AND age = :age LIMIT 10");
stmt.setParameter("username", "zoujiaqing");
stmt.setParameter("age", 18);
foreach(row; stmt.query())
{
writeln(row["username"]);
}
return "";
}
}Metadata
Metadata
Assignees
Labels
No labels