coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: Brooklyn on April 18, 2012, 03:13:47 PM

Title: SQL Query to Title Select Images in a Given Album
Post by: Brooklyn on April 18, 2012, 03:13:47 PM
Similar to this question (http://forum.coppermine-gallery.net/index.php/topic,74779.0.html), 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?
Title: Re: SQL Query to Title Select Images in a Given Album
Post by: ΑndrĂ© 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
UPDATE cpg15x_pictures SET title = 'new title' WHERE pid BETWEEN xxx AND yyy
Title: Re: SQL Query to Title Select Images in a Given Album
Post by: Brooklyn on April 18, 2012, 04:15:13 PM
That'll do it, thanks again.