SA-MP Forums Archive
Select all from SQL - 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: Select all from SQL (/showthread.php?tid=598387)



Select all from SQL - Squirrel - 11.01.2016

Alright so Im trying to load everything from the SQL but it loads only first 2 rows & ID is incorrect

PHP код:
new query[256];
    
mysql_format(mysqlquerysizeof(query),"SELECT `Reason`,`Date`,`By`,`ID` FROM `bolo`");
    
mysql_tquery(mysqlquery"OnBoloLoad","i",playerid); 
EDIT: What im trying to basically do is to load the entire table.


Re: Select all from SQL - itsCody - 11.01.2016

PHP код:
mysql_tquery(mysql"SELECT * FROM `bolo`""OnBoloLoad""i"playerid); 
Try that.


Re: Select all from SQL - Squirrel - 11.01.2016

Still nothing :/

this is my displaying
PHP код:
for(new i=0rowsi++) {
        
cache_get_field_content(i"Reason"someStringName);
        
cache_get_field_content(i"Date"IssuedByString);
        
cache_get_field_content(i"By"string);
        
cache_get_field_content(i"ID"dateString);
        
format(mainstring,sizeof(mainstring),"{00FFFF}Text: {FFFFFF}%s || {00FFFF}Date: {FFFFFF}%s || {00FFFF}By: {FFFFFF}%s || {00FFFF}ID: {FFFFFF}%i",someStringName,IssuedByString,string,dateString);
        
Msg(playerid,-1,mainstring);
        
crimecount++;
    } 



Re: Select all from SQL - itsCody - 11.01.2016

Post the full callback


Re: Select all from SQL - Squirrel - 11.01.2016

Nevermind.. I failed somewhere else....

Thanks for the help tho :*