sql.TableExists

From GMod Wiki

Jump to: navigation, search
Function
Syntax sql.TableExists( String table_name )
Where is this used?
Description:
Returns true if the table exists in the database. False if it doesn't
Returns: Boolean
Part of Library: Sql
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Sql.TableExists]Sql.TableExists [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionCheck to see if there is a table called "player_info"
Used onNewerServer.png
Code
if (sql.TableExists("player_info")) then
   Msg("player_info table exists!");
end
OutputIf the player_info table exists, the console will print the message: "player_info table exists!"


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox