I need help MySql
#1

I can save the information in mysql but not can not catch them.
Reply
#2

Код:
SELECT `field`, `field`, `field` FROM `table` WHERE `field`='value'
or something a long those lines
Reply
#3

It depends on what you want to catch...

Look at the example below.
pawn Код:
new fields[25][40];
      new model[128];
      if(PlayerInfo[playerid][pCarkey] != 999)
      {
        format(sql, sizeof(sql), "SELECT * FROM cars WHERE %d", PlayerInfo[playerid][pCarkey]);
        samp_mysql_query(sql);
            samp_mysql_store_result();
            samp_mysql_fetch_row(row);
            split(row, fields, '|');
            samp_mysql_free_result();
            format(model, sizeof(model), "%s", strval(fields[10]));
            format(string, sizeof(string), "*Vйhicule 1: %s || ID: %d", model, PlayerInfo[playerid][pCarkey2]);
        if(TmpCarID[TmpCarKeys[playerid]] == PlayerInfo[playerid][pCarkey] || TmpCarID[TmpCarKeys2[playerid]] == PlayerInfo[playerid][pCarkey]) SendClientMessage(playerid, COLOR_GREEN, string);
        else SendClientMessage(playerid, COLOR_WHITE, string);
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)