Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: SQL Query to Title Select Images in a Given Album  (Read 1983 times)

0 Members and 1 Guest are viewing this topic.

Brooklyn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
SQL Query to Title Select Images in a Given Album
« on: April 18, 2012, 03:13:47 pm »

Similar to this question, how would I then batch name via SQL query a select portion of pictures within a given album? For example, I want to title only pictures xxx through yyy inside a given album, I assume using a PID statement, but cannot figure out how to implement that variable.

Any suggestions?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: SQL Query to Title Select Images in a Given Album
« Reply #1 on: April 18, 2012, 03:42:35 pm »

http://dev.mysql.com/doc/refman/5.5/en/comparison-operators.html#operator_between

So you could use something like
Code: [Select]
UPDATE cpg15x_pictures SET title = 'new title' WHERE pid BETWEEN xxx AND yyy
Logged

Brooklyn

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: SQL Query to Title Select Images in a Given Album
« Reply #2 on: April 18, 2012, 04:15:13 pm »

That'll do it, thanks again.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.