Jump to content

SQL always! ._.


Anubhav

Recommended Posts

  
    local select = executeSQLQuery("SELECT * FROM characters WHERE serial=?", getPlayerSerial(player)) 
    cooldowns.chck[player] = setTimer(function() cooldowns.chck[player]=nil end, 5000, 1) 
    if #select == 0 then 
        setTimer(triggerClientEvent, 5000, 1, player, "character.toggleWindow", player) 
    else 
  

Ok so now I did this.

And see the output of when I selected. It always return empty, and adds the same serial again!

When I selected, what a mess.

  
EC3D9678CC99DF5BD699AECC928920E3 
6F25BB2D6702AC1BAC786F79727F2353 
EC3D9678CC99DF5BD699AECC928920E3 
6F25BB2D6702AC1BAC786F79727F2353 
6F25BB2D6702AC1BAC786F79727F2353 
EC3D9678CC99DF5BD699AECC928920E3 
6F25BB2D6702AC1BAC786F79727F2353 
EC3D9678CC99DF5BD699AECC928920E3 
EC3D9678CC99DF5BD699AECC928920E3 
EC3D9678CC99DF5BD699AECC928920E3 
EC3D9678CC99DF5BD699AECC928920E3 
EC3D9678CC99DF5BD699AECC928920E3 
  

Link to comment
  • Moderators

ehm?

How are you outputting it? / store it.

The function you called select is a lua function, I will not recommend you to use it as overwrite.

select (index, ···) 
  
If index is a number, returns all arguments after argument number index. Otherwise, index must be the string "#", and select returns the total number of extra arguments it received.  

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