zabbix-agent2/src/libs/zbxdb/db.c
/*
 * Execute SQL statement. For select statements only.
 */
Execute SQL statement. For select statements only.
Execute SQL statement . For select statements only .
DB_RESULT	zbx_db_select_n(const char *query, int n)
{
#if defined(HAVE_ORACLE)
	return zbx_db_select("select * from (%s) where rownum<=%d", query, n);
#elif defined(HAVE_MYSQL) || defined(HAVE_POSTGRESQL) || defined(HAVE_SQLITE3)
	return zbx_db_select("%s limit %d", query, n);
#endif
}
DB_RESULT zbx_db_select_n ( const char * query , int n ) { #if defined ( HAVE_ORACLE ) return zbx_db_select ( " " , query , n ) ; #elif defined ( HAVE_MYSQL ) || defined ( HAVE_POSTGRESQL ) || defined ( HAVE_SQLITE3 ) return zbx_db_select ( " " , query , n ) ; #endif }
Execute SQL statement.
Execute SQL statement .