Hello I'm trying to insert a string into mysql which is:
|
playersteamid
I'm making an item that will give you access to a certain door for 10 seconds. This key item uses this following code:
Code:
public item_key(id)
{
new authid[32], query[256]
get_user_authid(id,authid,31)
format(query,255,"UPDATE property SET access=access+%s WHERE doorname='hotel_door_a'",authid)
dbi_query(dbc,query)
client_print(id,print_chat,"You have 10 seconds to open the door")
set_task(10.0,"remove_key")
return PLUGIN_HANDLED
}
public remove_key(id)
{
new authid[32], query[256]
get_user_authid(id,authid,31)
format(query,255,"UPDATE property SET access=access-%s WHERE doorname='hotel_door_a'",authid)
dbi_query(dbc,query)
client_print(id,print_chat,"10 Seconds are up!")
return PLUGIN_HANDLED
}
The only thing it's been able to do so far is put "|" in the access column but the steam id isn't there. Any help?