[TYPO3-german] MySQL Inserts per sql_query

Janine Schendel bogomil21 at web.de
Mon Sep 30 13:06:49 CEST 2013


Moin,

Ich habe SQL Statements die per sql_query an die DB gesendet werden.

Verwende Typo 4.7.10

Laut typo3 Doku unter Verwendung der funktion sql_query 

http://api.typo3.org/typo3cms/47/html/classt3lib___d_b.html#a813ec7ab30efb95
ec607f14b0c9d74bc

function sql_query($query) {
  $res = mysql_query($query, $this->link);
  if ($this->debugOutput) {
     $this->debug('sql_query', $query);
  }
  return $res;
}

Für dieses Statement bekomme ich von sql_affected_rows die Anzahl 3 zurück.
Nur sind die Daten nicht in der Tabelle.
Führe ich unter den gleichen Zugangsdaten in myphpadmin dieses SQL Statement
aus, sind die Daten drin.

Ich muss sql_query verwenden, da ich mit  

INSERT INTO table (col_1, col_2) VALUES ('2222', '3679'), ('2222', '3436'),
('2222', '3448') ON DUPLICATE KEY UPDATE col_1 = VALUES(col_1) , col_2 =
VALUES(col_2)

arbeite. 

Mir fehlt total ein Ansatz, wo ich suchen soll. Typo3 oder doch MySQL.

Von 98 Datensätzen, die in diesem Stil ausgeführt werden, sind nur 55 in der
DB gelandet.

LG
Janine



More information about the TYPO3-german mailing list