/* 
		This is Database Functions header file 
*/

#if defined(DB)

/* The databases  recognized by this definition */
#define DEFINED_DB {"null","mysql","pgsql"}

#define SQLCMDL 1024

#if defined(DB_MYSQL)
#define MYAUTHSQL "SELECT %s FROM %s WHERE %s=\"%s\" and router = 1"
#define MYACCTSQL "INSERT INTO %s (usern,s_name,c_name,elapsed_time,bytes_in,bytes_out,date,cmd,type) VALUES (\"%s\",\"%s\",\"%s\",%s,%s,%s,NOW(),\"%s\",\"%s\")"
#endif /* DB_MYSQL */

#if defined(DB_PGSQL)
#define PWLEN   100
#define PGAUTHSQL "SELECT %s FROM %s WHERE %s='%s' and router = 1"
#define PGACCTSQL "INSERT INTO %s (usern,s_name,c_name,elapsed_time,bytes_in,bytes_out,date,cmd,type) VALUES (SUBSTRING('%s',0,15),'%s','%s',%s,%s,%s,TO_CHAR(Now(), 'YYYY-MM-DD HH24:MI:SS'),'%s','%s')"
#endif /* DB_PGSQL */

#endif /* DB */
