Jump to content

[SQL]


X-SHADOW

Recommended Posts

is this SQL Or MySQL ?

local connection = executeSQLQuery ( "CREATE TABLE IF NOT EXISTS gangs ( gangName TEXT, leader TEXT, color TEXT )" ) 
  
--[[ GANG SYSTEM ]] 
  
local cost = 20000 
local maxStr = 20 
  
function gangIsLeader ( uPlayer, uTeam ) 
    local select = executeSQLQuery ( "SELECT leader FROM gangs WHERE gangName = '" .. uTeam .. "' " ); 
    if ( select[1]["leader"] == uPlayer ) then 
        return true; 
    else 
        return false; 
    end 
end 
  
function gangSetLeader ( uTeam, uPlayer ) 
    executeSQLQuery ( "UPDATE gangs SET leader = '" .. uPlayer .. "' WHERE gangName = '" .. uTeam .. "' ") 
    return true 
end 

Link to post
is this SQL Or MySQL ?
local connection = executeSQLQuery ( "CREATE TABLE IF NOT EXISTS gangs ( gangName TEXT, leader TEXT, color TEXT )" ) 
  
--[[ GANG SYSTEM ]] 
  
local cost = 20000 
local maxStr = 20 
  
function gangIsLeader ( uPlayer, uTeam ) 
    local select = executeSQLQuery ( "SELECT leader FROM gangs WHERE gangName = '" .. uTeam .. "' " ); 
    if ( select[1]["leader"] == uPlayer ) then 
        return true; 
    else 
        return false; 
    end 
end 
  
function gangSetLeader ( uTeam, uPlayer ) 
    executeSQLQuery ( "UPDATE gangs SET leader = '" .. uPlayer .. "' WHERE gangName = '" .. uTeam .. "' ") 
    return true 
end 

That'S SQL.

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...