gboolean afgs_command_have_content gchar *  cmd_string,
  ...
 

Allows to executing the given SQL instruction and report if such instruction have returned some content.

This function is useful when you execute commands that tries to figure out if some database row exist.

As an example you might be interested on checking if some item exist on the database so, you could do:

 if (afgs_command_have_content ("SELECT id FROM customers WHERE id = %s", customer_id)) {
     // our customer exists
 }else {
     // customer doesn't exists
 }

NOTE 1: that previous sentence doesn't check the meaning of the SQL statement, as a consenquence you must ensure that the given SQL statement provides a result if the element is found or an empty data result if the element be looked up doesn't exist.

NOTE 2: this function deallocates results get from the execution of the test.

Parameters:
cmd_string The SQL statement to check for emptyness
Returns:
TRUE if the SQL have some content, FALSE if not.