AMX Mod X API Documentation

Signature
stock bool:sqlite_TableExists(Handle:db, const table[]){ new Handle:query = SQL_PrepareQuery( db, "SELECT name FROM sqlite_master WHERE type='table' AND name='%s' LIMIT 1;", table); if(!SQL_Execute(query) || !SQL_NumResults(query)) { SQL_FreeHandle(query); return false; } SQL_FreeHandle(query); return true;}
Description

This function can be used to find out if a table in a SQLite database exists.

Parameters
  • db Connection handle returned from SQL_Connect().
  • table The table name to check for.
Returns

True if it exists, false otherwise.

Назад
Верх