-- Functions
-- Functions
function dbSet(...)
if not {...} then return end
local qh = dbQuery(DBHandler, ...)
if not qh then return false end
local result, num_affected_rows, last_insert_id = dbPoll(qh, -1)
return result, num_affected_rows, last_insert_id
end
function dbGet(...)
if not {...} then return end
local stringe=dbPrepareString(DBHandler,...)
local query=dbQuery(DBHandler, stringe)
local result,num_affected_rows, last_insert_id =dbPoll(query, -1)
return result
end
addEventHandler("onResourceStart", resourceRoot, function()
DBHandler=dbConnect("mysql", "dbname="..DBName..";host="..DBHost.."", DBUser, DBPass, "share=1")
if DBHandler then
outputDebugString("* Connect to server MYSQL...")
else
outputDebugString("* No Connecting to server MYSQL..")
end
end)
[/lua]
a 22 linijka to:
[lua]
local result,num_affected_rows, last_insert_id =dbPoll(query, -1)
[/lua]
nie rozumiem dlaczego to nie dziala i o co chodzi z tym kiedy nie widze nic tu takiego jak: db_59611.saj
[ Dodano: 2020-09-22, 15:42 ]
a jesli nie o to chodzi tylko o doslownie kolumny pod tymi nazwami typu pystories-user albo pystories-vehicles to takze przejrzalem wszystkie kolumny i nie ma takiej o nazwie saj i nie ma indeksu o nazwie saj
zrobilem to pozniej mi pokazalo ze failed bo nie ma takiego czegos jak Serial dorobilem kolumne do tabeli saj i juz tak nie spami, dziekuje i dalej nie wiem po co temu pystories-db taka tabela XD do zamkniecia
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach