Scripting/Squirrel/Functions/mysql num rows

From Vice City Multiplayer
Revision as of 18:28, 30 January 2017 by Thijn (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing

Returns the number of rows selected from a query.

Syntax

mysql_num_rows( query );

Arguments

  • query - The name of the previously executed query.

Example

function onPlayerJoin()
{
local query<- mysql_query(vcmpdb, "SELECT * FROM bans WHERE IP = '"+player.IP+"'");
if (mysql_num_rows(query)==0)
{
ClientMessage("Welcome.",player,255,255,255);
}
else player.Kick();
}

Related Functions