Want more features on Pastebin? Sign Up, it's FREE!
Guest

GPS

By: a guest on Jan 23rd, 2013  |  syntax: MySQL  |  size: 1.48 KB  |  views: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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
clone this paste RAW Paste Data