Raised This Month: $32 Target: $400
 8% 

Consulta SQL


  
 
 
Thread Tools Display Modes
Author Message
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 07-05-2013 , 18:55   Consulta SQL
#1

holaaa, hace cuanto no jodia por aca
tengo una duda, estoy haciendo un rank de lvls para mi hns laser y no se bien como hacer la consulta
yo la pensé así, pero no me carga :S
PHP Code:
//consulta:
select Level PJ
  from cuentas
 where max
(Level
se nota que me base en el sistema de cuentas de Neel xD
Anti is offline
Send a message via Skype™ to Anti
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 07-05-2013 , 19:06   Re: Consulta SQL
#2

ya encontré un ejemplo: http://forums.alliedmods.net/showthread.php?t=202522
sigo sin saber porque la otra forma no sirve :S
Anti is offline
Send a message via Skype™ to Anti
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 07-06-2013 , 05:06   Re: Consulta SQL
#3

PHP Code:
if (g_connection != Empty_Handle)
{
    new 
Handle:query SQL_PrepareQuery(g_connection"SELECT (COUNT(*) + 1) FROM `%s` WHERE `Prestige` > '%d' OR (`Prestige` = '%d' AND `Experience` > '%d')"TABLE2g_prestige[id], g_prestige[id], g_experience[id])
    
SQL_Execute(query)
    
    if (
SQL_NumResults(query))
        
zp_colored_print(id"^x04[ZA]^x01 Tu ranking es ^x04%s^x01 de ^x04%s^x01."add_point(SQL_ReadResult(query0)), add_point(g_createdcharacters))
        
    
SQL_FreeHandle(query)


Last edited by baneado; 07-06-2013 at 05:07.
baneado is offline
 



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

Forum Jump


All times are GMT -4. The time now is 23:20.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode