Jump to content

Mysql_free_result (Bad argument)


Recommended Posts

  
        local result =  mysql_query(sqlcon, "INSERT INTO user_data SET Username='"..mysql_escape_string(sqlcon, username).."', Password='"..md5(password).."', EMail='"..mysql_escape_string(sqlcon,email).."', Fraktion='0', Skin='15', Rank='0', Spawn='0', Job='0', Materials='0', Drugs='0', LicA='0', LicB='0', LicC='0', Money='150', Bank='1500', Adminlevel='0', PlayedM='0', PlayedH='0', Wanted='0', Jailtime='0', Slot1='Frei', Slot2='Frei', Slot3='Frei', Slot4='Frei', Slot5='Frei', Slot6='Frei', Slot7='Frei', Slot8='Frei', Slot9='Frei', Slot10='Frei', Housekey='255';") 
        mysql_free_result(result) 
        result = mysql_query(sqlcon,"SELECT * FROM user_data WHERE Username='"..mysql_escape_string( sqlcon, username ).."';") 
        if mysql_num_rows( result ) == 1 then 
            row = mysql_fetch_row(result) 
        else 
            outputChatBox( "Der Account konnte nicht erfolgreich erstellt werden, bitte kontaktiere einen Admin", source ) 
        end 
        mysql_free_result(result) 

This is my Code, but it doesn't works because there is a error :

bad argument #1 to 'mysql_free_result' (Luabook.MysqlResult expected, got nil)

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