Skip to content

Commit acee692

Browse files
committed
Tidy
1 parent a3b5d9e commit acee692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sqllib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The format is:-
7777
- Optional `safe_` meaning to abort on error
7878
- `query`
7979
- Optional `_store` or `_use` for queries that return rows
80-
- Optional suffix `_f` (for format inline), `_free` for use and free malloc'd query, `_s` for use `sql_s_t*` composed string
80+
- Optional suffix `_f` (for format inline), `_free` for use and free malloc'd query, `_s` for use `sql_s_t*` composed string, otherwise a query string is passed and not freed.
8181

8282
A query like `SELECT` or `DESCRIBE` returns a value, and so you have to use a `_store` or `_use` query functions, which return `SQL_RES*`. The `_use` version streams the result from the SQL server, and is not usually what you want. Only use `_use` if you have some stupidly big query result that won't fit in memory. The `_store` versions stores the result - this has the advantage you can see how many rows there are `sql_num_rows(res)` and it frees the `SQL` handle to allow other queries even when working through the rows of the result. You free the result with `sql_free_result(res)`. The `_safe` version always returns an `SQL_RES*` or errors, the non `_safe` returns NULL if error.
8383

0 commit comments

Comments
 (0)