D and MySQL

Trass3r un at known.com
Tue Jul 19 11:48:29 PDT 2011


Am 19.07.2011, 20:49 Uhr, schrieb Adam Ruppe <destructionator at gmail.com>:

>    foreach(line; mysql.query("select id, name from users where id > ?",  
> 5)) {
>
>            // access to columns by name
>           writefln("%s: %s", line["id"], line["name"]);
>           // alternatively, you can write:
>           writefln("%s: %s", line[0], line[1]);
>
>    }

I guess access via opDispatch would also be nice to have?!


More information about the Digitalmars-d-learn mailing list