Advertisement
Guest User

GPS

a guest
Jan 23rd, 2013
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.48 KB | None | 0 0
  1.  
  2.     select
  3.         `profile`.`name` AS `Name`,
  4.         `survivor`.`id` AS `PlayerID`,
  5.         replace(replace(replace(substring_index(`survivor`.`state`, ',', 1),'[',''),']',''),'"','') AS `Current Weapon`,        
  6.         truncate(left(((SUBSTRING_INDEX(SUBSTRING_INDEX(SUBSTRING_INDEX(`survivor`.`worldspace`, ',[', -1),']]',1),',',1))/100),6),1) AS `y`,
  7.         TRUNCATE(LEFT(((15360-(cast(substring_index(substring_index(substring_index(substring_index(`survivor`.`worldspace`,',[',-1),']]',1),',',2),',',-1) as decimal(16,1))))/100),6),1) AS `x`,
  8.         `survivor`.`worldspace` AS `Position`,
  9.         floor(substring_index(substring_index(`survivor`.`medical`, ',[],', 1),',',-(1))) AS `Blood`,
  10.         concat(' Z: ',
  11.                 cast(`profile`.`total_zombie_kills` as char (20) charset utf8),
  12.                 ' Pl: ',
  13.                 cast((`profile`.`total_bandit_kills` + `profile`.`total_survivor_kills`)
  14.                     as char (20) charset utf8)) AS `Kills`
  15.     from
  16.         (`survivor`
  17.         join `profile` ON ((`survivor`.`unique_id` = `profile`.`unique_id`)))
  18.     where
  19.         ((`survivor`.`is_dead` = 0)
  20.             and (`survivor`.`last_updated` >= (now() - interval 30 day)))
  21.     order by (truncate(left(substring_index(substring_index(substring_index(`survivor`.`worldspace`, ',[', -(1)),']]',1),',',1),6),1)
  22.             + truncate(left(substring_index(substring_index(substring_index(substring_index(`survivor`.`worldspace`, ',[', -(1)),']]',1),',',2),',',-(1)),6),1)) desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement