Component index
Section index

Component sql_query


	    sql_query is a general purpose way to perform an SQL query and
	    iterate over the result. It provides enough functags to avoid
	    all the redundant stuff normally associated with databases query.
	static void sample_query()
	    // Define the default database.
	    // Use the to create and stuff the sample database
	    // sh create
	    // sh stuff
	    query_setdefaultdb ("localhost","sample");
	    <call sql_query>("select * from test");
	    <f empty>
	        printf ("No record found\n");
	    <f dostart>
	        printf ("List of records in table \"items\"\n");
	    <f doend>
	        printf ("--------\n");
	    <f onerow>
	        printf ("record %03d: %-30s\t%-30s\t%-20s\t%s\n",rownum