PHP MySQL multiple insert performance using pdo named parameters vs single sql line -


Using MISLL and PDO. It is faster to run a single query like multiple inserts (or updates, delete) in one way: INSERT (field 1, field 2, field 3) value in the table (' ('Value1_1', 'value1_2', 'value1_3'), ('value2_1', 'value2_2', 'value2_3'), ('value3_1', 'value3_2', 'value3_3')

(INSERT: value1, value2, value3)

  table (field 1, field 2, field 3) values, using the named parameter like this: P> and then adding such standards:  
  & lt ;? Php $ stmt- & gt; Bound pattern (: value1, $ value1); $ Stmt- & gt; Bypass ((value 2, $ value2); $ Stmt- & gt; Bypass (value: 3, $ value3); $ Value1 = 'abc'; $ Value2 = 'def'; $ Value3 = 'ghj'; $ Stmt- & gt; Executed (); $ Value1 = 'abc'; $ Value2 = 'def'; $ Value3 = 'ghj'; $ Stmt- & gt; Executed (); $ Value1 = 'abc'; $ Value2 = 'def'; $ Value3 = 'ghj'; $ Stmt- & gt; Executed (); ? & Gt;  


Comments