[TYPO3-german] MySQL Inserts per sql_query

chris Wolff chris at connye.com
Mon Sep 30 16:32:26 CEST 2013


hi Janinie,
kann es sein das die 3 fehlenden einen dublicate key hatten und
deswegen eienn UPDATE gemacht wurde?

gruss chris

Am 30. September 2013 13:06 schrieb Janine Schendel <bogomil21 at web.de>:
> 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
>
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german



-- 
christian wolff - webdeveloper, tech-loving geek and typo3 enthusiast
telefon: +49 30 347 244 88
mobil:  +49 179 49 44 758
email: chris at connye.com
adresse: friedelstraße 31 - 12047 berlin

xing-profil: http://www.xing.com/profile/Christian_Wolff43
google+: https://plus.google.com/u/0/115669673917212236875/posts?hl=de
facebook: https://www.facebook.com/1stMachine
flattr: https://flattr.com/profile/1stmachine


More information about the TYPO3-german mailing list