1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Solved SQL arrays

Discussion in 'Development' started by SavionLegendZzz, May 1, 2019.

  1. SavionLegendZzz

    SavionLegendZzz Slime

    Messages:
    75
    GitHub:
    savionlegends
    I was wondering what is the most effective way of putting this:
    Code:
    ---
    SavionLegendZzz:
      Classes:
        Default:
          Name: Default
          Primary: AR15
          Secondary: M1911
          Perk: Ghost
      Unlocked-Primaries:
      - AR15
      - Remington
      Unlocked-Secondaries:
      - M1911
      Unlocked-Perks:
      - None
      - Ghost
      Unlocked-Equipment:
      - None
      - Grenade
      Level: 1
      XP: 0
      Kills: 0
      Deaths: 0
      FreeForAll:
        Wins: 0
        Losses: 0
      UUID: :P
      TeamDeathMatch:
        Wins: 0
        Losses: 0
      Tier-One-Killstreak:
      - None
      - UAV
      Tier-Two-Killstreak:
      - None
      Tier-Three-Killstreak:
      - None
      Name: SavionLegendZzz
    ...
    
    into my SQL database ? i have tried looking it up with no success
     
  2. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    load it it through yaml_parse() and upload it serialized
     
    SavionLegendZzz likes this.
  3. SavionLegendZzz

    SavionLegendZzz Slime

    Messages:
    75
    GitHub:
    savionlegends
    thanks! instead of the doing serialized/unserialized i used json_encode and json_decode for anyone who was wondering.
     
  4. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    You don't need SQL if you just serialize all the data into a during. SQL is a table storage, not a string storage.
     
    KielKing likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.