| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <?php
- $properties = [
- "useractivity" => 26812157,
- "logins" => 4361,
- "weaponsbought" => 11148,
- "attackmisses" => 23099,
- "attackdamage" => 59339207,
- "attackhits" => 52822,
- "axehits" => 1067,
- "attackswon" => 14058,
- "highestbeaten" => 100,
- "bestkillstreak" => 504,
- "jailed" => 306,
- "mailssent" => 1724,
- "attackcriticalhits" => 10813,
- "slahits" => 425,
- "moneymugged" => 19552798251,
- "largestmug" => 1000026663,
- "friendmailssent" => 375,
- "roundsfired" => 271152,
- "pishits" => 346,
- "defendswon" => 2765,
- "hospital" => 8372,
- "defendslost" => 3694,
- "rifhits" => 6620,
- "attackslost" => 797,
- "attacksassisted" => 336,
- "attacksstealthed" => 8335,
- "onehitkills" => 6547,
- "dumpsearches" => 1026,
- "dumpfinds" => 1026,
- "itemsdumped" => 5050,
- "itemssent" => 3567,
- "drugsused" => 5351,
- "cantaken" => 77,
- "auctionswon" => 16,
- "daysbeendonator" => 1880,
- "spousemailssent" => 104,
- "medicalitemsused" => 21704,
- "companymailssent" => 185,
- "trainsreceived" => 1071,
- "cityfinds" => 522,
- "theyrunaway" => 1022,
- "failedbusts" => 249,
- "peoplebusted" => 3000,
- "pointsbought" => 44095,
- "itemsbought" => 3426,
- "xantaken" => 4811,
- "traveltimes" => 3474,
- "mextravel" => 481,
- "itemsboughtabroad" => 92725,
- "cantravel" => 462,
- "lontravel" => 387,
- "caytravel" => 410,
- "argtravel" => 350,
- "hawtravel" => 165,
- "japtravel" => 132,
- "switravel" => 586,
- "soutravel" => 133,
- "dubtravel" => 172,
- "chitravel" => 196,
- "shrtaken" => 50,
- "shohits" => 157,
- "piehits" => 4646,
- "bountiescollected" => 798,
- "totalbountyreward" => 210769630,
- "medstolen" => 8,
- "attacksdraw" => 218,
- "virusescoded" => 125,
- "yourunaway" => 157,
- "victaken" => 84,
- "overdosed" => 108,
- "revivesreceived" => 805,
- "auctionsells" => 15,
- "exttaken" => 246,
- "kettaken" => 50,
- "respectforfaction" => 76338,
- "smghits" => 1663,
- "bountiesreceived" => 206,
- "factionmailssent" => 173,
- "peoplebought" => 502,
- "peopleboughtspent" => 54974080,
- "chahits" => 234,
- "machits" => 119,
- "heahits" => 697,
- "networth" => 30913343466,
- "grehits" => 276,
- "missioncreditsearned" => 40942,
- "contractscompleted" => 1022,
- "dukecontractscompleted" => 1022,
- "revives" => 663,
- "missionscompleted" => 1,
- "bountiesplaced" => 486,
- "totalbountyspent" => 194793585,
- "bloodwithdrawn" => 5140,
- "lsdtaken" => 11,
- "defendsstalemated" => 28,
- "meritsbought" => 45,
- "opitaken" => 14,
- "nerverefills" => 1409,
- "consumablesused" => 24693,
- "candyused" => 1838,
- "alcoholused" => 13823,
- "energydrinkused" => 9032,
- "tokenrefills" => 200,
- "organisedcrimes" => 158,
- "booksread" => 10,
- "h2hhits" => 147,
- "classifiedadsplaced" => 6,
- "traveltime" => 37995600,
- "unarmoredwon" => 259,
- "stockpayouts" => 486,
- "boostersused" => 1188,
- "territorytime" => 2624733,
- "rehabs" => 6667,
- "rehabcost" => 1404830000,
- "awards" => 462,
- "statenhancersused" => 5,
- "bestdamage" => 11472,
- "racingpointsearned" => 2118,
- "raceswon" => 698,
- "racesentered" => 2390,
- "receivedbountyvalue" => 88109384,
- "pcptaken" => 1,
- "cityitemsbought" => 85276,
- "specialammoused" => 10977,
- "spetaken" => 1,
- "hollowammoused" => 4000,
- "tracerammoused" => 2498,
- "incendiaryammoused" => 2493,
- "piercingammoused" => 1986,
- "refills" => 1611
- ];
- $list = [];
- foreach ( $properties as $key => $val ) {
- $list[] = strval($key);
- }
- print("<pre>");
- print_r( $list );
- print("</pre>");
- $pdo = null;
- try {
- $pdo = new PDO("sqlite:" . './slork.sqlite');
- } catch (PDOException $e) {
- // handle the exception here
- }
- if ( !$pdo ) {
- exit( "Cannot connect to database" );
- }
- $query = "DROP TABLE IF EXISTS properties;";
- $pdo->exec( $query );
- $query = "CREATE TABLE IF NOT EXISTS properties (id INTEGER PRIMARY KEY, property TEXT, UNIQUE(property));";
- $pdo->exec( $query );
- $query = "INSERT INTO properties (property) VALUES (?) ON CONFLICT (property) DO NOTHING;";
- $stmt = $pdo->prepare( $query );
- foreach ( $list as $item ) {
- $stmt->execute( [$item] );
- }
- /**
- $query = "SELECT property FROM properties;";
- $stmt = $pdo->query( $query );
- foreach( $stmt as $row ) {
- print( $row['property'] . ', ');
- }
- */
|