sqlite read issue
#2

Try this:

pawn Код:
ReadVehicle(playerid);
public ReadVehicle(playerid)
{
    new query[256],string[128];
    new DBResult:qresult;
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
//SELECT vehicleinfo FROM vehicleinfo WHERE username = '%s' AND slotid = %d", pname, slotid);
    //format(string,sizeof(string),"SELECT Level FROM `users` WHERE Username = '%s'", PlayerName[playerid]);
    //format(query,sizeof(query),"SELECT stat FROM `Users` WHERE `Name`= '%s'",pName);
    //format(query,sizeof(query),"SELECT Name FROM `Users` WHERE `Name`= '%s'",pName);
   
    //format(query, sizeof(query), "SELECT Users FROM Users WHERE name = '%s'",pName);
    format(query, sizeof(query), "SELECT Users FROM `Users` WHERE name = '%s'",pName);
    qresult = db_query(testdb,query);
   
    //if(db_num_rows(qresult) == 1)
   // {
        db_get_field_assoc(qresult,"name",string,6);
        format(string,sizeof(string),"%s",strval(string));
        SendClientMessage(playerid,0xAFAFAFAA,string);
    //}
    db_free_result(qresult);
}
Reply


Messages In This Thread
sqlite read issue - by boelie - 14.03.2012, 17:19
Re : sqlite read issue - by Cyril59 - 14.03.2012, 18:53
Re: sqlite read issue - by boelie - 14.03.2012, 19:20
Re: sqlite read issue - by boelie - 16.03.2012, 12:26

Forum Jump:


Users browsing this thread: 1 Guest(s)