Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. dofile("alinet")
  2. alinet.connect()
  3. local _SERVER = alinet.gethost("ALINET","DATABASE")
  4.  
  5. if _SERVER == false then
  6. error("ALISQL Server offline",2)
  7. end
  8.  
  9. function addData(id, dataName, data)
  10. alinet.send(_SERVER,{"1",id,dataName,data},"ALINET")
  11. end
  12.  
  13. function getData(id, dataName)
  14. alinet.send(_SERVER,{"2",id,dataName},"ALINET")
  15. local d = alinet.get()
  16. if d[1] == "1" then
  17. return d[2]
  18. end
  19. end
  20.  
  21. function delData(id, dataName)
  22. alinet.send(_SERVER,{"3",id,dataName},"ALINET")
  23. end
  24.  
  25. function delId(id)
  26. alinet.send(_SERVER,{"4",id},"ALINET")
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement