Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2017-09-19, 14:49


xsuperx122







Wiek: 32
Na forum: 3415 dni
Posty: 18



Respekt: 50

Witam podpi??em sql pod moja paczk? ale nie dzia?a :( wie ktos co mo?na z tym zrobi??
konsola:

==================================================================
= Multi Theft Auto: San Andreas v1.5.4
==================================================================
= Server name : FutureCityStories - Polski serwer RPG @Server Project
= Server IP address: 178.33.54.31
= Server port : 20508
=
= Log file : ..ents/s26940/mods/deathmatch/logs/server.log
= Maximum players : 25
= HTTP port : 20509
= Voice Chat : Disabled
= Bandwidth saving : Maximum with lightweight sync rate of 1500ms
==================================================================
[2017-09-19 14] Resource 'guied' requests some acl rights. Use the command 'aclrequest list guied'
[2017-09-19 14] Resource 'guieditor' requests some acl rights. Use the command 'aclrequest list guieditor'
[2017-09-19 14] Resources: 381 loaded, 0 failed
[2017-09-19 14] Server password set to '1234561'
[2017-09-19 14] Starting resources...
[2017-09-19 14] Server minclientversion is now 1.5.4-9.11674.0
[2017-09-19 14] Gamemode 'play' started.
[2017-09-19 14] ERROR: Couldn't find resource Brama. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource Brama.Jeff. Check it exists.
[2017-09-19 14] WARNING: community-interakcjaPoj/c.lua(Line 128) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
[2017-09-19 14] Some files in 'community-interakcjaPoj' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] ERROR: Couldn't find resource community-licznik. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource frakcja-SSPZ. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource og-naprawapojazdow. Check it exists.
[2017-09-19 14] WARNING: [ogrpg]/DB2/sql.lua:16: Bad usage @ 'dbConnect' [Access denied for user 'db_26941'@'94.23.90.14' (using password: YES)]
[2017-09-19 14] BRAK POLACZENIA Z BAZA DANYCH!
[2017-09-19 14] WARNING: ogrpg-db min_mta_version> section in the meta.xml is incorrect or missing (expected at least server 1.5.2 because of 'dbPrepareString')
[2017-09-19 14] WARNING: ogrpg-db requires upgrade as min_mta_version> section in the meta.xml is incorrect or missing (expected at least server 1.5.2 because of 'dbPrepareString')
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:33: Bad usage @ 'dbConnect' [Access denied for user 'db_26941'@'94.23.90.14' (using password: YES)]
[2017-09-19 14] INFO: * No Connecting to server MYSQL..
[2017-09-19 14] ERROR: [ogrpg]/ogrpg-db/s_db.lua:54: attempt to call global 'mysql_connect' (a nil value)
[2017-09-19 14] WARNING: ogrpg-logging/c_zone.lua(Line 73) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
[2017-09-19 14] WARNING: ogrpg-logging/c_logging.lua(Line 112) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
[2017-09-19 14] Some files in 'ogrpg-logging' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:25: Bad argument @ 'dbPrepareString' [Expected db-connection at argument 1, got boolean]
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:26: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean]
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:27: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean]
[2017-09-19 14] ERROR: [ogrpg]/ogrpg-vehicles/s_vehbuy.lua:72: bad argument #1 to 'pairs' (table expected, got boolean)
[2017-09-19 14] WARNING: onl-gui/c_gui.lua [Client] is encoded in ANSI instead of UTF-8. Please convert your file to UTF-8.
[2017-09-19 14] WARNING: onl-gui/c_gui.lua(Line 24) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
[2017-09-19 14] Some files in 'onl-gui' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] ERROR: Couldn't find resource podmianka-drogi-fcstories. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource podmianka-manana-fcstories. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource ogrpg-fotoradary. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource podmianka-vincent-timl. Check it exists.
[2017-09-19 14] SCRIPT ERROR: [prace]/FC-praca_bus/bus.lua:1: unexpected symbol near '@'
[2017-09-19 14] ERROR: Loading script failed: [prace]/FC-praca_bus/bus.lua:1: unexpected symbol near '@'
[2017-09-19 14] WARNING: [prace]/FC-PracaMagazyniera/s_interior.lua:10: Bad argument @ 'setElementPosition' [Expected bool at argument 5, got number '35']
[2017-09-19 14] WARNING: [prace]/FC-sweepery/s_job.lua:10: Bad argument @ 'createColCuboid' [Expected vector3 at argument 4, got nil]
[2017-09-19 14] WARNING: [prace]/FC-sweepery/s_job.lua:11: Bad argument @ 'setElementParent' [Expected element at argument 1, got boolean]
[2017-09-19 14] SCRIPT ERROR: [skrypty]/FC-Animacje/server.lua:1: '=' expected near 'napisany'
[2017-09-19 14] ERROR: Loading script failed: [skrypty]/FC-Animacje/server.lua:1: '=' expected near 'napisany'
[2017-09-19 14] ERROR: Couldn't find resource FC-AntySpam. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource FC-CzysteAuta. Check it exists.
[2017-09-19 14] SCRIPT ERROR: [skrypty]/FC-ekipa/ekipa.lua:1: unexpected symbol near '@'
[2017-09-19 14] ERROR: Loading script failed: [skrypty]/FC-ekipa/ekipa.lua:1: unexpected symbol near '@'
[2017-09-19 14] WARNING: FC-kamera/firstperson.lua(Line 24) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
[2017-09-19 14] WARNING: FC-kamera/firstperson.lua(Line 109) [Client] getControlState is deprecated and may not work in future versions. Please replace with getPedControlState.
[2017-09-19 14] Some files in 'FC-kamera' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] SCRIPT ERROR: [skrypty]/FC-nm-iadmin/s.lua:12: '=' expected near '-'
[2017-09-19 14] ERROR: Loading script failed: [skrypty]/FC-nm-iadmin/s.lua:12: '=' expected near '-'
[2017-09-19 14] WARNING: FC-Ogranicznik/tempomat_c.lua(Line 75) [Client] getControlState is deprecated and may not work in future versions. Please replace with getPedControlState.
[2017-09-19 14] Some files in 'FC-Ogranicznik' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] WARNING: FC-Radio-auta/gui.lua(Line 1) [Client] showPlayerHudComponent is deprecated and may not work in future versions. Please replace with setPlayerHudComponentVisible.
[2017-09-19 14] Some files in 'FC-Radio-auta' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] INFO: --------------------------
[2017-09-19 14] INFO: loaded station: Energy Remix
[2017-09-19 14] INFO: loaded station: Radio Chillout
[2017-09-19 14] INFO: loaded station: ESKA Warszawa
[2017-09-19 14] INFO: loaded station: RMF MAXX
[2017-09-19 14] INFO: loaded station: VIVA
[2017-09-19 14] INFO: loaded station: RMF FM
[2017-09-19 14] INFO: loaded station: DJ TOP 50
[2017-09-19 14] INFO: loaded station: Niezapomniane przeboje
[2017-09-19 14] INFO: loaded station: Najwieksze przeboje
[2017-09-19 14] INFO: loaded station: Najwieksze Polskie przeboje
[2017-09-19 14] INFO: loaded station: Play Your Sound
[2017-09-19 14] INFO: loaded station: Fresh.FM
[2017-09-19 14] INFO: loaded station: Open.FM DubStep
[2017-09-19 14] INFO: loaded station: Eska RAP
[2017-09-19 14] INFO: loaded station: RADIO ZET
[2017-09-19 14] INFO: loaded station: DiscoPolo
[2017-09-19 14] INFO: loaded station: FRESH (NAJNOWSZE KAWALKI)
[2017-09-19 14] INFO: loaded station: DANCE
[2017-09-19 14] INFO: loaded station: TRAP
[2017-09-19 14] ERROR: Couldn't find resource FC-SkinRCON. Check it exists.
[2017-09-19 14] WARNING: YNL-house_system/core/core_server.lua(Line 78) [Server] setPedFrozen is deprecated and may not work in future versions. Please replace with setElementFrozen.
[2017-09-19 14] Some files in 'YNL-house_system' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] ERROR: Couldn't find resource FC-blipgracz�w. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource FC-dodawaniedomk�w. Check it exists.
[2017-09-19 14] SCRIPT ERROR: [skrypty_glowne]/FC-domy/s_domy.lua:21: 'then' expected near 'local'
[2017-09-19 14] ERROR: Loading script failed: [skrypty_glowne]/FC-domy/s_domy.lua:21: 'then' expected near 'local'
[2017-09-19 14] WARNING: FC-GieldaLS/s_sprzedaz.lua(Line 61) [Server] getVehicleModel is deprecated and may not work in future versions. Please replace with getElementModel.
[2017-09-19 14] Some files in 'FC-GieldaLS' use deprecated functions.
[2017-09-19 14] Use the 'upgrade' command to perform a basic upgrade of resources.
[2017-09-19 14] WARNING: [skrypty_glowne]/FC-Lokalizacje2/server.lua:3: Bad argument @ 'setPlayerHudComponentVisible' [Expected element at argument 1, got string 'area_name']
[2017-09-19 14] WARNING: [ogrpg]/DB2/sql.lua:28: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean]
[2017-09-19 14] ERROR: [skrypty_glowne]/FC-lss-domy/interiory.lua:15: bad argument #1 to 'ipairs' (table expected, got nil)
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:18: Bad argument @ 'dbPrepareString' [Expected db-connection at argument 1, got boolean]
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:19: Bad argument @ 'dbExec' [Expected db-connection at argument 1, got boolean]
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:25: Bad argument @ 'dbPrepareString' [Expected db-connection at argument 1, got boolean]
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:26: Bad argument @ 'dbQuery' [Expected db-connection at argument 1, got boolean]
[2017-09-19 14] WARNING: [ogrpg]/ogrpg-db/s_db.lua:27: Bad argument @ 'dbPoll' [Expected db-query at argument 1, got boolean]
[2017-09-19 14] ERROR: [skrypty_glowne]/FC-lss-domy/domy.lua:111: bad argument #1 to 'ipairs' (table expected, got boolean)
[2017-09-19 14] ERROR: Couldn't find resource FC-MK. Check it exists.
[2017-09-19 14] WARNING: [Teleporty]/teleportzprawka/interior.lua:4: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
[2017-09-19 14] ERROR: Couldn't find resource ORG-NOTBAD. Check it exists.
[2017-09-19 14] ERROR: Couldn't find resource speedrunners-baza. Check it exists.
[2017-09-19 14] Querying MTA master server... success! (Auto detected IP:178.33.54.31)
[2017-09-19 14] Authorized serial account protection is enabled for the ACL group(s): `Admin` See http://mtasa.com/authserial
[2017-09-19 14] WARNING: owner_email_address> not set
[2017-09-19 14] Server started and is ready to accept connections!
[2017-09-19 14] To stop the server, type 'shutdown' or press Ctrl-C
[2017-09-19 14] Type 'help' for a list of commands.


ps. raczej dobrze podpi??em sql

Ostatnio zmieniony przez _Haze 2017-09-19, 14:52, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-19, 14:54


nanKy







Wiek: 22
Na forum: 3866 dni
Posty: 498
Nick w MP: nanky

Piwa: 1773

Respekt: 239
Respekt: 239Respekt: 239

?le podpi??e?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-19, 16:26


xsuperx122







Wiek: 32
Na forum: 3415 dni
Posty: 18



Respekt: 50

s_db:
-[[
Resource: OURGame v2
Developers: Split <[email protected]>
You have no right to use this code without my permission.
(c) 2015 <[email protected]>. All rights reserved.
]]

-- Settings
DBHandler=nil
DBName="db_26941"
DBUser="db_26941"
DBPass="GDwWpSr0ECWI"
DBHost="94.23.90.14"

-- Functions
function dbSet(...)
if not {...} then return end
local stringe=dbPrepareString(DBHandler,...)
local query=dbExec(DBHandler, stringe)
return query
end

function dbGet(...)
if not {...} then return end
local stringe=dbPrepareString(DBHandler,...)
local query=dbQuery(DBHandler, stringe)
local result=dbPoll(query, -1)
return result
end


addEventHandler("onResourceStart", resourceRoot, function()
DBHandler=dbConnect("mysql", "dbname=db_26941;host=94.23.90.14", "db_26941","GDwWpSr0ECWI","share=1")
if DBHandler then
outputDebugString("* Connect to server MYSQL...")
dbSet("SET NAMES utf8")
else
outputDebugString("* No Connecting to server MYSQL..")
end
end)


local SQL_LOGIN="db_26941"
local SQL_PASSWD="GDwWpSr0ECWI"
local SQL_DB="db_26941"
local SQL_HOST="94.23.90.14"
local SQL_PORT=3306

local root = getRootElement()

local SQL

local function connect()
SQL = mysql_connect(SQL_HOST, SQL_LOGIN, SQL_PASSWD, SQL_DB, SQL_PORT)
if (not SQL) then
outputServerLog("BRAK POLACZENIA Z BAZA DANYCH!")
else
--mysql_query(SQL,"SET NAMES utf8")
--outputServerLog("Modul mysql polaczony!")
end

end





sql.lua:


--[[
Obsluga baz danych, interfejs do bazy MySQL realizowany za pomoca wbudowanych w MTA funkcji db...

@author Lukasz Biegaj <[email protected]>
@author WUBE <[email protected]>
@copyright 2011-2013 Lukasz Biegaj <[email protected]>
@license Dual GPLv2/MIT
@package MTA-XyzzyRP
@link https://github.com/lpiob/MTA-XyzzyRP GitHub
]]--

local SQL

local function connect()
-- w ponizszej linii uzupelnij dane autoryzacji
SQL = dbConnect("mysql", "dbname=db_26941;host=94.23.90.14", "db_26941","GDwWpSr0ECWI","share=1")
if (not SQL) then
outputServerLog("BRAK POLACZENIA Z BAZA DANYCH!")
else
zapytanie("SET NAMES utf8;")
end

end

addEventHandler("onResourceStart",resourceRoot, connect)

function pobierzTabeleWynikow(...)
local h=dbQuery(SQL,...)
if (not h) then
return nil
end
local rows = dbPoll(h, -1)
return rows
end



Tak mam

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-19, 21:14


Szymczu

Programista bo tak






Wiek: 27
Na forum: 3434 dni
Posty: 194
Nick w MP: Szymczu

Piwa: 36

Respekt: 120
Respekt: 120

Udost?pni?e? wszystkie dane do bazy jak co?..

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-09-21, 15:22


xsuperx122







Wiek: 32
Na forum: 3415 dni
Posty: 18



Respekt: 50

Spookonie wiem co robie heh

[ Dodano: 2020-12-07, 21:37 ]
Kod:

Hhjbb


Postaw piwo autorowi tego posta
 

 
Tagi: sql
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » SQL Odpowiedz do tematu

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
Dodaj temat do Ulubionych
Wersja do druku