Change SQL
#1

How i can change mysql variable?
need to have public LoadTurfs like public Detector_Load

This is from my GM
PHP код:
public Detector_Load()
{
    static
        
rows,
        
fields;
 
    
cache_get_data(rowsfieldsg_iHandle);
 
    for (new 
0rows++) if (MAX_METAL_DETECTORS)
    {
        
MetalDetectors[i][detectorExists] = 1;
        
MetalDetectors[i][detectorID] = cache_get_field_int(i"detectorID");
        
MetalDetectors[i][detectorPos][0] = cache_get_field_float(i"detectorX");
        
MetalDetectors[i][detectorPos][1] = cache_get_field_float(i"detectorY");
        
MetalDetectors[i][detectorPos][2] = cache_get_field_float(i"detectorZ");
        
MetalDetectors[i][detectorPos][3] = cache_get_field_float(i"detectorAngle");
        
MetalDetectors[i][detectorInterior] = cache_get_field_int(i"detectorInterior");
        
MetalDetectors[i][detectorWorld] = cache_get_field_int(i"detectorWorld");
 
        
Detector_Refresh(i);
    }
    return 
1;

This is imported
PHP код:
public LoadTurfs()
{
    new 
result[100],index 0;
    
mysql_query(SQL,"SELECT * FROM `turfs` ORDER BY `turfs`.`ID` ASC");
    
mysql_store_result();
    while(
mysql_retrieve_row())
    {
        
index++;
        new 
index;
        
mysql_get_field("ID"result);              TurfInfo[i][zID] = strval(result);
        
mysql_get_field("Owned"result);           TurfInfo[i][zOwned] = strval(result);
        
mysql_get_field("Time"result);            TurfInfo[i][zTime] = strval(result);
        
mysql_get_field("MinX"result);            TurfInfo[i][zMinX] = floatstr(result);
        
mysql_get_field("MinY"result);            TurfInfo[i][zMinY] = floatstr(result);
        
mysql_get_field("MaxX"result);            TurfInfo[i][zMaxX] = floatstr(result);
        
mysql_get_field("MaxY"result);            TurfInfo[i][zMaxY] = floatstr(result);
    }
    
mysql_free_result();
    
printf("[MySQL Turfs]: %d"index);
    return 
1;

Reply
#2

Can someone help?
Reply
#3

Bump
Reply
#4

Bump
Reply
#5

You're Bumping way too often, please read the forum rules.

Specify what you want, I did not understand quite what you meant.
Reply
#6

Quote:
Originally Posted by denNorske
Посмотреть сообщение
You're Bumping way too often, please read the forum rules.

Specify what you want, I did not understand quite what you meant.
Need to change from MySQL plugin R34 to MySQL plugin R39-3
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)