Page 1 of 1

Creating php script for MySql Query

Posted: Wed Mar 25, 2009 11:57 pm
by ShoutChris
Hi Guys

I do not have a clue where to start in turning the follow MySql query into a php script can anyone help. I am :banghead: and going :crazy: trying. The script needs to loop so all records are updated in the downloadable_link table. Any help would be great.
UPDATE catalog_product_entity_media_gallery ri, downloadable_link rri
SET rri.image_id = ri.value
WHERE rri.product_id = ri.entity_id
Cheers

Re: Creating php script for MySql Query

Posted: Thu Mar 26, 2009 3:15 am
by requinix
You can run that query with mysql_query.

Re: Creating php script for MySql Query

Posted: Thu Mar 26, 2009 3:17 am
by vivianflv
wow, cool.