change the case that galleryadd.pl did for me

adriand

Joined: 2005-07-16
Posts: 14
Posted: Thu, 2006-06-08 03:36

like the title says, I want to convert all the album/photo titles to lowercase. The galleryadd.pl script (though wonderful) decided to convert all my underscores to spaces, and my first letters of EVERY word to Upper Case. Need I say this looks REALLY bad on some titles, especially the ones that have acronyms (like Byob) and such.

I understand a little bit of mysql querries (like how to find stuff) but not enough to change strings.

gallery conveniently has all items under one table (g_items, i believe) with one column (g_title). knowing that, what do I need to run to convert everything to lowercase.

also, using the column g_haschildren (or something like that which refers to folders vs photos) how could I go about changing spaces to underscores (I want all my photos to not have any spaces in them).

much thanks.

 
Dick Knod

Joined: 2006-02-18
Posts: 20
Posted: Thu, 2006-06-29 09:11

Just use the LOWER() function in the SELECT query no need to lowercase your whole database...
Or if u wanne change more ... (its more difficult) u should look into regular expression.

 
adriand

Joined: 2005-07-16
Posts: 14
Posted: Thu, 2006-06-29 19:11

could you give me an example using a known table and column? I'm just not that familiar with SQL to apply functions to querries, and the syntax is a bit confusing.

or maybe, can you point me to a good resource for learning this stuff? I guess its better to teach a man to fish...