Author Topic: Adding tags and custom fields with SQL-Query  (Read 177 times)

0 Members and 1 Guest are viewing this topic.

Offline Lena

  • Newbie
  • *
  • Posts: 46
Adding tags and custom fields with SQL-Query
« on: 20.03.2017 12:05:02 »

I have 730 new downloads that "want to be" tagged and have custom fields... but... I'm lazy. I managed to add the custom field with a SQL Query.

UPDATE `#__jdownloads_files`
SET custom_field_3='1'
WHERE file_pic='pdf.png';

I have two types of downloads. Pdf and Mp3. So I can insert the data into the custom field depending on the file pic. The pic is there by default while uploading. I'm no SQl expert. So I have no idea how to extent the #__contentitem_tag_map. I guess I have to work with joins... Any ideas?