Easy MySQL - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Easy MySQL (
/showthread.php?tid=642463)
Easy MySQL -
Matteo987 - 01.10.2017
Hi,
I'm making a house system, so in easy mysql, how to get all the rows in the table "house" ?
Cuz in
PHP код:
new handle = SQL::Open(SQL::READ, "drop", (requires a coulmn here and its format));
there, it requires column name + the format.
So how can I select all the data of all rows using it?
Re: Easy MySQL -
Max_Andolini - 01.10.2017
Use mine Easy MySQL;
https://sampforum.blast.hk/showthread.php?tid=606930
PHP код:
new handle = SQL::Open(SQL::MTREAD, "houses");
SQL_GetCallback(handle, i)
{
SQL::ReadInt(handle, "id", Houses[i][id], i);
SQL::ReadFloat(handle, "h_posx", Houses[i][h_posx], i);
SQL::ReadFloat(handle, "h_posy", Houses[i][h_posy], i);
SQL::ReadFloat(handle, "h_posz", Houses[i][h_posz], i);
}
SQL::Close(handle);//You must close the handle.
Re: Easy MySQL -
Matteo987 - 01.10.2017
I can't open update like this? Tag mismatch error.
PHP код:
new handle = SQL::Open(SQL::UPDATE, "inv", "Name", GetName(playerid));
Re: Easy MySQL -
Max_Andolini - 01.10.2017
PHP код:
new handle = SQL::Open(SQL::UPDATE, "inv", "Name", GetName(playerid));
SQL::Open for integer
Use SQL::OpenEx
PHP код:
new handle = SQL::OpenEx(SQL::READ, "players", "p_name", ret_pName(playerid));
SQL::ReadString(handle, "p_password", UserInfo[playerid][p_password], 64);
SQL::ReadInt(handle, "p_id", UserInfo[playerid][p_id]);
SQL::Close(handle);