cleanup, docs

This commit is contained in:
root
2026-06-16 23:02:45 +00:00
parent ea08d5f28b
commit b8b56cf3dd
160 changed files with 1076 additions and 511 deletions
+10 -1
View File
@@ -27,4 +27,13 @@ DValue rows = mysql_query(m,
The result is returned as a `DValue`, which makes it easy to iterate through rows and read fields with the usual `DValue` accessors.
:example
print("mysql_query is resource-bound; configure the service or connection, then call it in request code.\n");
MySQL* db = mysql_connect();
if(db != 0)
{
DValue rows = mysql_query(db, "select 'ada@example.test' as email, 1 + 1 as total");
String email = "none"; String total = "?";
rows.each([&](DValue r, String key) { email = r["email"].to_string(); total = r["total"].to_string(); });
print(email, " / total=", total, "\n");
mysql_disconnect(db);
}
else print("(requires a reachable MySQL server)\n");