TiPhoon
By: a guest | Mar 21st, 2010 | Syntax:
Lua | Size: 0.53 KB | Hits: 70 | Expires: Never
function VehSQL(player, command, car)
handler = mysql_connect("localhost", "root", "000000", "myserver")
if not handler then
outputChatBox("Something wrong here with the database.")
else
outputChatBox("Connected.")
local queryobj = "SELECT vehid FROM `vehicles` WHERE vehicle = "..car..""
local result = mysql_query(handler, "SELECT vehid FROM `vehicles` WHERE vehicle = '" ..car .. "'")
outputChatBox("The car id is " ..result.. ".", player)
mysql_free_result(result)
end
end
addCommandHandler("vehSQL", VehSQL)