xtramen Posted February 25, 2016 Share Posted February 25, 2016 (edited) Hallo Leute, kann mir jemand sagen warum das so nicht funktioniert? foreach ($results as $row){ $new_description = 'foo'; $update_sql = 'UPDATE '._DB_PREFIX_.'product_lang SET description = "' . $new_description . '" where id_product = '.$row['id_product'].' and id_lang = 1'; Db::getInstance()->Execute($update_sql); } Es wir immer nur das erste Ergebnis in der Schleife abgeändert. Auch mit der Methode update() funktionierts nicht. Db::getInstance()->Update(_DB_PREFIX_.'product_lang', array('description' => pSQL($new_description)), 'id_product = '.$row['id_product'].' and id_lang = 1'); Hat jemand eine Idee? Edited February 25, 2016 by xtramen (see edit history) Link to comment Share on other sites More sharing options...
0 BluTiGeS Posted February 26, 2016 Share Posted February 26, 2016 Hast du deine query mal ausgeben lassen? Bzw. Deine where condition? Link to comment Share on other sites More sharing options...
Question
xtramen
Hallo Leute,
kann mir jemand sagen warum das so nicht funktioniert?
Es wir immer nur das erste Ergebnis in der Schleife abgeändert.
Auch mit der Methode update() funktionierts nicht.
Hat jemand eine Idee?
Edited by xtramen (see edit history)Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now