dbQueryGetLastQuery#

Purpose#

Returns the text of the current query being used.

Format#

query_string = dbQueryGetLastQuery(qid)#
Parameters:

qid (scalar) – query number.

Returns:

query_string (string) – text of the current query, or empty string if there is no current query.

Examples#

// Execute a query
qid = dbExecQuery(db_id, "SELECT name, price FROM products");

// Retrieve the SQL text of the current query
sql = dbQueryGetLastQuery(qid);

// Prints: SELECT name, price FROM products
print sql;