lavina
7 months ago

Bulk insert

Posted 7 months ago by lavina

Hello guys, i have a table in my database that contains 3 columns, x/y/z. And i have a json that looks like this:

array:3 [
  0 => array:1 [
    0 => {#649
      +"x": 0.50838017463684
      +"y": 0.47858500480652
      +"z": 0.41899466514587
    }
  ]
  1 => array:1 [
    0 => {#638
      +"x": 0.51666665077209
      +"y": 0.47777771949768
      +"z": 0.49444448947906
    }
  ]
  2 => array:1 [
    0 => {#642
      +"x": 0.0
      +"y": 0.0
      +"z": -2.3841857377249E-9
    }
  ]
]

How can i bulk insert of all them?

Please sign in or create an account to participate in this conversation.