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: Meaning of tables and columns in Coppermine database  (Read 3930 times)

0 Members and 1 Guest are viewing this topic.

QuaySo

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
Meaning of tables and columns in Coppermine database
« on: March 16, 2005, 12:30:38 pm »

Hello,

I'm using Coppermine for a few days now and have 1 question I couldn't find an answer in the documentation. Is there a description of the Coppermine database model?
I'm asking this, because I would like to add some info to the pictures using a script. At this time I have all pictures in my IMatch image database including a lot of information about photgrapher, date/time taken, equipment etc. This info should go to Coppermine. Therefo I should have some insight in the datamodel. Most of the tables and columns are quite easy to understand, but a few I don't know....

For instance: the table cpg132_pictures contains two columns with time information:
- mtime     timestamp(14)
- ctime      int(11)

What are they used for? And how do I store a time in ctime? This integer value does not mean anything to me yet....

Any help (a link to documentation I have overlooked?) would be appreciated!

-- Arno
Logged

Nibbler

  • Guest
Re: Meaning of tables and columns in Coppermine database
« Reply #1 on: March 16, 2005, 01:23:12 pm »

There isn't such a document unfortunately.

The mtime holds when the pic was last viewed
The ctime holds when the pic was uploaded as a unix timestamp

the unix timestamp is the number of seconds passed since Jan 1st 1970 - google for it and check the php date and time functions.
Logged

QuaySo

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
Re: Meaning of tables and columns in Coppermine database
« Reply #2 on: March 16, 2005, 01:50:35 pm »

Hi Nibbler,

Thanks for your fast response. Your explanation answers my first questions about mtime and ctime. I will proceed making my scripts and hope not to bother you too often with questions about the meaning of database objects.

-- Arno
Logged

Nibbler

  • Guest
Re: Meaning of tables and columns in Coppermine database
« Reply #3 on: March 16, 2005, 01:53:50 pm »

Maybe when the scripts are done you can return and post them on the board to help others looking to do the same thing. :)
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Meaning of tables and columns in Coppermine database
« Reply #4 on: March 16, 2005, 06:57:11 pm »

probably looking at nibbler's timer script would help you out as well. It's a batch add /auto create cat/album structure hack that probably could be used in some way shape or form for anybody looking to convert from another gallery.
Logged

QuaySo

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
Re: Meaning of tables and columns in Coppermine database
« Reply #5 on: March 17, 2005, 07:30:17 pm »

Donnoman, thanks for your hint. It might be good not to invent the wheel again!!

One problem. I've been looking for this script, but wasn't able to find it. Can you please point me to the secret place?  ;)

-- Arno
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Logged

QuaySo

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 4
Re: Meaning of tables and columns in Coppermine database
« Reply #7 on: March 18, 2005, 03:29:06 pm »

Thanks again. I hope to find some time to play around with this code next weekend...

-- Arno
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.