SA-MP Forums Archive
[Pedido] Tutorial de Database! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Tutorial de Database! (/showthread.php?tid=632342)



Tutorial de Database! - henriqueTL - 12.04.2017

BOM ESOTU CRIANDO UM MINE SISTEMA DE RANK EU ESTOU QUERENDO APRENDER TUTORIAIS DE DATABASE ALQUEM PODE ME ARRUMA UM TUTORIAL DE DATABASE OU DEIXA O LINK ABAIXO PFV?


Re: Tutorial de Database! - IlanZ - 12.04.2017

Video Tutorial MySQL
https://sampforum.blast.hk/showthread.php?tid=299675
https://sampforum.blast.hk/showthread.php?tid=579909
https://sampforum.blast.hk/showthread.php?tid=129183
https://sampforum.blast.hk/showthread.php?tid=391920

Se for novato sem saber o bбsico do Pawn, nem recomendo


Re: Tutorial de Database! - henriqueTL - 12.04.2017

Quote:
Originally Posted by IlanZ
Посмотреть сообщение
vlw man +rep


Re: Tutorial de Database! - ipsLuan - 13.04.2017

Usa algum sistema de salvamento SQL (SQLite ou MySQL).
Se vocк for fazer integraзхes site-servidor usa MySQL por ser mais fбcil com este modo.
Se nгo for, usa SQLite.


Re: Tutorial de Database! - henriqueTL - 13.04.2017

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Usa algum sistema de salvamento SQL (SQLite ou MySQL).
Se vocк for fazer integraзхes site-servidor usa MySQL por ser mais fбcil com este modo.
Se nгo for, usa SQLite.
Pow o meu problema e um mine sistema de rank q estou querendo deixa ele anunciando no chat por minutos e minutos


Re: Tutorial de Database! - ipsLuan - 13.04.2017

Quote:
Originally Posted by henriqueTL
Посмотреть сообщение
Pow o meu problema e um mine sistema de rank q estou querendo deixa ele anunciando no chat por minutos e minutos
Isso й fбcil. Ainda mais usando SQL que basta usar "ORDER BY `nivel `ASC".


Re: Tutorial de Database! - henriqueTL - 13.04.2017

Quote:
Originally Posted by ipsLuan
Посмотреть сообщение
Isso й fбcil. Ainda mais usando SQL que basta usar "ORDER BY `nivel `ASC".
Mas tipo como sou iniciante nao sei meche muito com pawno E pra min esse tutoriais ficou muito dificil


Re: Tutorial de Database! - ipsLuan - 13.04.2017

Tenha isto como base. Tenho mais experiкncia com DOF2, mas estou me aventurando com SQL.

PHP код:
CMD:familias(playeridparams[])
{
    new 
contagem 0;
    
SendClientMessage(playeridCOLOR_NEWS"•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•· Lista de Familias •·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·");
    
format(querysizeof(query), "SELECT * FROM `familias` ORDER BY `id` ASC");
    
resultado db_query(conexaoquery);
    for(new 
fdb_num_rows(resultado); f++, db_next_row(resultado)) //true
    
{
        
contagem++;
        new 
nomefamilia[24], liderfamilia[24], idffield[10], drestante;
        
db_get_field_assoc(resultado"id"fieldsizeof(field)); idf strval(field);
        
db_get_field_assoc(resultado"nome"nomefamiliasizeof(nomefamilia));
        
db_get_field_assoc(resultado"lider"liderfamiliasizeof(liderfamilia));
        
db_get_field_assoc(resultado"dias"fieldsizeof(field));
        
drestante = (strval(field) - getdate());
        
format(celulassizeof(celulas), "• ID: [%d] - Famнlia: [%s] - Lнder: [%s] - Dias restantes: [%d] •"idfnomefamilialiderfamiliadrestante);
        
SendClientMessage(playeridAZULCLAROcelulas);
    }
    
db_free_result(resultado);
    
SendClientMessage(playeridCOLOR_NEWS"•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·•·");
    if(
contagem 0
    {
        
format(celulassizeof(celulas), "[CUROSIDADES:] Temos atualmente %02d famнlias cadastradas no servidor."contagem);
        
SendClientMessage(playeridCOLOR_LIGHTREDcelulas);
    }
    return 
1;




Re: Tutorial de Database! - henriqueTL - 13.04.2017

OLHA O MP AI RAPIDINHO


Re: Tutorial de Database! - NathanT - 13.04.2017

Eu comecei a usar MySQL recentemente, nunca tinha usado ele antes — apenas manipulava salvamento de contas com DOF2 —, nada mesmo, entretanto consegui entender seu funcionamento com o tutorial do paulor que й esse: 12 - MySQL.
Foi com este tutorial que consegui aprender o que me foi preciso atualmente de MySQL sem ter nem noзгo de como ele funcionava, veja e reveja atй entender bem, lhe recomendo.