Jump to content

SQL


Wei

Recommended Posts

executeSQLInsert ( "group", "'"..groupName.."', '"..groupTag.."', '" .. groupType .. "', '"..groupColorR.."', '"..groupColorG.."', '"..groupColorB.."', '"..getAccountName(getPlayerAccount(source)).."'" ) 
     

I can't f****** find whats wrong....

ERROR:Database query failed: near "group": syntax error

Link to comment

I have 2 questions more.

addEvent("groupSystem:isCreator", true ) 
addEventHandler("groupSystem:isCreator", getRootElement(), 
function( ) 
local isCreator = executeSQLSelect("group_", "groupCreator", "groupCreator = '"..getAccountName(getPlayerAccount(source)).."'") 
    if isCreator then 
    triggerClientEvent(source, "groupSystem:showRemoveGroup", source, true ) 
    end 
end 
) 

why this allways returns true ?

addEvent("groupSystem:removeGroup", true ) 
addEventHandler("groupSystem:removeGroup", getRootElement(), 
function() 
    executeSQLDelete("group_", "groupName = '"..getElementData(source, "Group").."'") 
end 
) 
  

How can I make this that it will remove the whole line ?

Link to comment
addEvent ( "groupSystem:isCreator", true ) 
addEventHandler ( "groupSystem:isCreator", getRootElement(), 
    function ( ) 
        local isCreator = executeSQLSelect ( "group_", "groupCreator", "groupCreator = '".. getAccountName ( getPlayerAccount ( source ) ) .."'" ) 
        if ( isCreator and type ( isCreator ) == "table" and #isCreator == 1 ) then 
            triggerClientEvent ( source, "groupSystem:showRemoveGroup", source, true ) 
        end 
    end 
) 

Link to comment

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...