Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: SQL Query to Title Select Images in a Given Album  (Read 1961 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.017 seconds with 19 queries.