I am unable to update s_srticles_attributes table through shopware. can someone help?

i am using sql query in my controller to update s_articles_attributes table

$sql= “Update s_articles_attributes SET attr1=’”.$attr1."’ where articleID=’".$articleId."";
Shopware()->Db()->executeQuery($sql);

but unable to execute it through shopware and when i execute it via phpmyadmin it works.

Any help?

Hi alirizvi,

is there any error message?  

Just read your query again. The attribute fields are in the table ‘s_articles_attributes’. So you have to change the table in your query  Wink

Best regards from Schöppingen

 Michael Telgmann

1 „Gefällt mir“

hi michael, thanks for correction in my question

even this is not working

$sql= “Update s_articles_attributes SET attr1=’”.$attr1."’ where articleID=’".$articleId."";
Shopware()->Db()->executeQuery($sql);

is there any error message?

no and as i said query is working fine in phpmyadmin not in shopware as shown below:

ajax response i am getting

{"success":true,"1":"Update s_articles_attributes SET attr1='VZ435890' where articleID='166' and articledetailsID='730'"}

 

phpmyadmin success

data row: