SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Español/Spanish

Reply
 
Thread Tools Display Modes
Old 09/08/2017, 08:44 PM   #1
Sarti
Little Clucker
 
Sarti's Avatar
 
Join Date: Oct 2016
Posts: 5
Reputation: 0
Default AYUDA MYSQL

Hola estoy actualizando mi gm de mysql r6 a mysql r39-3 me podrian ayudar a convertir este codigo a la version de MySQL r39-3 para tomarlo de base gracias

HTML Code:
format(string, sizeof(string), "SELECT * FROM server WHERE Server = '1'");
	mysql_query (string);
	mysql_store_result();

	if (mysql_num_rows() > 0)
	{
		new wdata[128];
		while (mysql_retrieve_row())
		{
			mysql_get_field("Gamemode",wdata);
			CURRENT_GAMEMODE = strval(wdata);
		}
	}
	else
	{
		printf("[MYSQL]: Could Not Retrieve Field - Shutting Down Server.");
		SendRconCommand("gmx");
	}
	mysql_free_result();
Sarti is offline   Reply With Quote
Old 13/08/2017, 06:55 AM   #2
Eloy
Huge Clucker
 
Join Date: May 2016
Location: Venezuela
Posts: 267
Reputation: 4
Default Respuesta: AYUDA MYSQL

PHP Code:
new MySQLHandler;

mysql_tquery(Handler"SELECT * FROM server WHERE Server = '1'",  "LoadData");

forward LoadData();
public 
LoadData()
{
    new 
Resultado cache_num_rows();
    new 
DataLoadeddata[128];
    if(
Resultado 0)
    {
        while(
DataLoaded Resultado)
        {
            
/* Un pequeño ejemplo... */
            /* ROW 1 */
cache_get_value_name(DataLoaded"Gamemode"data);
            
CURRENT_GAMEMODE strval(data);

        }
    }
    else
    {
        
printf("[MYSQL]: Could Not Retrieve Field - Shutting Down Server.");
        
SendRconCommand("gmx");
    }
    return 
1;

Eloy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Ayuda] Como paso de mysql r6-2 a mysql r39-3 Okrs Español/Spanish 2 25/05/2015 11:50 PM
Ayuda con MySQL Onfroi Español/Spanish 4 19/04/2013 09:30 PM
Ayuda Con MySql Parka Español/Spanish 4 16/07/2012 10:30 PM
[AYUDA] Mysql ValenRatti Español/Spanish 8 04/03/2012 12:45 PM
[AYUDA]MYSQL pagaromx96 Español/Spanish 9 17/12/2010 12:33 PM


All times are GMT. The time now is 01:14 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.