Jump to content

Edit History

ps8modules

ps8modules

Ciao,

Tramite script PHP:

$idImage = 27667;

$getIdProductByIdImage = Db::getInstance()->getValue('SELECT id_product FROM '._DB_PREFIX_.'image WHERE id_image = '.$idImage);

Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image SET cover = NULL WHERE id_product = '.$getIdProductByIdImage);

Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image SET cover = 1 WHERE id_image = '.$idImage);

 

ps8modules

ps8modules

Ciao,

Tramite copione:

$idImage = 27667;

$getIdProductByIdImage = Db::getInstance()->getValue('SELECT id_product FROM '._DB_PREFIX_.'image WHERE id_image = '.$idImage);

Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image SET cover = NULL WHERE id_product = '.$getIdProductByIdImage);

Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'image SET cover = 1 WHERE id_image = '.$idImage);

 

×
×
  • Create New...