Posts: 117
Threads: 26
Joined: Jan 2016
Hello i am making a dynamic system with MySQL. now i was wondering how do i load, save from a MySQL Database on Filterscriptinit and exit??
i uses select * from obj. do i have to just to do that? also, i want to CreateObject on the positions saved in DB.. how do i set it? also tell me how do i save all objects inside table obj when FilterScript exits
![Huh?](images/smilies/confused.gif)
?
Thanks for help
Posts: 117
Threads: 26
Joined: Jan 2016
Please help me my FS is just stuck at Saving part.. others all done.. please help me..
Posts: 117
Threads: 26
Joined: Jan 2016
Hey thanks for help mate.. Just to ask, is those "X" and "Y" and others are Names of Columns in my Table Right?
REPed you
EDIT: i am sorry but i didnt understand mysql_pquery thing.. also why did you had Stock function and Public callback both
![Huh?](images/smilies/confused.gif)
also in FilterScriptInit, i have to use that Stock Function to load objects of Public? (i Guess its public one but still clearing doubt. then where to use stock function?)
Posts: 117
Threads: 26
Joined: Jan 2016
Alright thanks for helping me i will test it as soon as i reach my home.. i am on highway right now :P
Ok but i didnt understand diffrence of
PHP код:
stock laodObjects(playerid)
{
mysql_format(db, query, sizeof(query), "SELECT * FROM `objects`");
mysql_pquery(db, query, "loadObjects", "d", sizeof(object));
}
and Public function. and also in place of db in above stock i have to use my DB right?
Thank you to help me. you deserve +rep too.
Posts: 117
Threads: 26
Joined: Jan 2016
Thank you for your help. i also have same doubt as GeorgeMcReary
Код:
How to set auto increment in Object ID? like while loading and saving?
How do i add Object IDs? also,
Код:
rows = clamp(rows, 0, sizeof object - 1);
What is object in that line? DB, Table or just a variable? i didnt not understand that one!!