Author Topic: Add A Tag To All Galleries With SQL Query (Repost)  (Read 836 times)

0 Members and 1 Guest are viewing this topic.

Offline a4evermedia

  • Global Moderator
  • Full Member
  • ***
  • Posts: 122
  • Karma: +25/-0
  • Gender: Male
    • View Profile
    • A4Ever Media
Add A Tag To All Galleries With SQL Query (Repost)
« on: July 30, 2012, 03:48:07 AM »
axljayangel  Posted: 10-19-2009 08:35pm

--------------------------------------------------------------------------------
Hello Jeremy,

That's great! May I also ask you one last question? I have a database of galleries where I wish to add a single tag to all galleries. May I ask what would be the raw query string to use? I looked up the Quick Tasks but it seems not possible to do so with it. Thank you!

Kind Regards,
A.J. Angel  
JMB-Jeremy  Posted: 10-20-2009 06:01am

--------------------------------------------------------------------------------
The raw query would look like this:


UPDATE `tx_galleries` SET `tags`=IF(`tags`='', 'newtag', CONCAT(`tags`, ' newtag'));

Where newtag is the tag that you want added to all of your galleries.  
axljayangel  Posted: 10-20-2009 07:08pm

--------------------------------------------------------------------------------
Hello Jeremy,

Shouldn't the code be the following instead?


UPDATE tx_galleries SET `tags`=IF(`tags`='', 'newtag', CONCAT(`tags`, ' newtag'));
Kind Regards,
A.J. Angel  
JMB-Jeremy  Posted: 10-20-2009 08:21pm

--------------------------------------------------------------------------------
Yes it should!

Unofficial JMB Support Forums

Add A Tag To All Galleries With SQL Query (Repost)
« on: July 30, 2012, 03:48:07 AM »


Tags:
 

Related Topics

  Subject / Started by Replies Last post
3 Replies
1118 Views
Last post December 18, 2012, 01:59:48 PM
by muttley1
6 Replies
1461 Views
Last post May 06, 2013, 04:29:48 AM
by bbhrucy79
3 Replies
2257 Views
Last post July 20, 2014, 02:29:19 AM
by bbhrucy79
0 Replies
733 Views
Last post May 14, 2014, 09:39:29 AM
by GFED
0 Replies
1171 Views
Last post February 13, 2015, 12:36:49 PM
by fear

anything