This is all you need to query the database. It takes as argument an SQL
query string (i.e.: "SELECT foo,bar FROM baz WHERE name like '%kinkie%'"
or "INSERT INTO baz VALUES ('kinkie','made','this')")
and returns a data structure containing the returned values.
The structure is an array (one entry for each returned row) of mappings
which have the column name as index and the column contents as data.
So to access a result from the first example you would have to do
"results[0]->foo".
A query which returns no data results in an empty array (and NOT in a 0).
Also notice that when there is a column name clash (that is: when you
join two or more tables which have columns with the same name), the
clashing columns are renamed to <tablename>+"."+<column name>.
To access those you'll have to use the indexing operator '[]
(i.e.: results[0]["foo.bar"]).