Jump to content
  • 0

Problem Mit Einem Db Query


xtramen

Question

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 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...