SA-MP Forums Archive
mysql check problem - 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: mysql check problem (/showthread.php?tid=591855)



mysql check problem - Dusan01 - 17.10.2015

Hi guys, i have problem with check, here is my code:

PHP код:
    new rowsFields;
    new 
komanda[126], adminimeig[126], toggle;
    
mysql_format(MySQLQuerysizeof(Query), "SELECT * FROM `komande` WHERE `komanda` = `%s`"cmdtext);
    
mysql_query(MySQLQuery);
    
cache_get_data(rowsFields);
    if(
rows) {
         new 
tmp[130];
        
//cache_get_field_content(0, "ID", tmp);
        //id = strval(tmp);
        
cache_get_field_content(0"komanda"tmp);
        
format(komanda126"%s"tmp);
        
        
cache_get_field_content(0"admin"tmp);
        
admin strval(tmp);
        
        
cache_get_field_content(0"igrac"tmp);
        
format(imeig126"%s"tmp);
        
        
cache_get_field_content(0"toggle"tmp);
        
toggle strval(tmp);
    } 
and table look like this:

structure:

ERROR:


Re: mysql check problem - Dusan01 - 17.10.2015

FIXED, i changed:
PHP код:
`%s
to
PHP код:
'%s'