Thread: PHP
View Single Post
Old 15.04.2005, 17:53   #7
Osito2Dancer
Архивный участник
 
Join Date: Mar 2005
Posts: 442
Default Re: PHP

Instead of this: select char_name, pledge_id, builder, class, use_time, PK, Duel, align from user_data where login>logout AND LOGOUT>0 AND LOGIN>0 AND account_id>=1 order by char_name

do this one:

select user_data.char_name, pledge.pledge_name, user_data.class, user_data.PK, user_data.Duel, user_data.align from user_data, pledge where login>logout AND LOGOUT>0 AND LOGIN>0 AND builder=0 and pledge.pledge_id = user_data.pledge_id order by char_name desc

This way, itll show Char Name, Pledge Name, Class, How many times he has been PK, how many Duels he has fought and Karma at the moment. It'll show only Players (Builder = 0) and it'll show the clan name. Nice select, you should try it in the query analyzer and fix the wrong naming (For instance, im not sure hat pledge is a table inside lin2world, or if the name is called by pledge_name). If you want a top X, just put "select top X" at the beginning and "order by lev desc".

Hope it helps, im here all week for any questions xD

Oso
Osito2Dancer is offline