Mercurial > mercurial > hgweb_searcher03.cgi
comparison src/db.cpp @ 7:7ac7d28699af
Display DB update day.
Ask print image with mask or not.
| author | pyon@macmini |
|---|---|
| date | Thu, 17 Oct 2013 19:54:23 +0900 |
| parents | 76db82822e73 |
| children | 4967d1e2b30c |
comparison
equal
deleted
inserted
replaced
| 6:76db82822e73 | 7:7ac7d28699af |
|---|---|
| 1 // Filename : db.cpp | 1 // Filename : db.cpp |
| 2 // Last Change: 18-Sep-2013. | 2 // Last Change: 16-Oct-2013. |
| 3 // | 3 // |
| 4 | 4 |
| 5 #include "db.h" | 5 #include "db.h" |
| 6 #include "wx/wxsqlite3.h" | 6 #include "wx/wxsqlite3.h" |
| 7 | 7 |
| 248 } | 248 } |
| 249 ccndb.Close(); | 249 ccndb.Close(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 //********** HHS-DB & CCN-DB **********// | 252 //********** HHS-DB & CCN-DB **********// |
| 253 /* DBの更新日時を取得 */ | |
| 254 wxArrayString GetLastUpdate( void ) | |
| 255 { | |
| 256 wxArrayString date; | |
| 257 wxString dbFile; | |
| 258 wxDateTime t; | |
| 259 | |
| 260 dbFile = wxGetCwd() + wxFILE_SEP_PATH + wxT("db") + wxFILE_SEP_PATH + wxT("ccn.db"); | |
| 261 wxFileName ccn( dbFile ); | |
| 262 t = ccn.GetModificationTime(); | |
| 263 date.Add( t.FormatISODate() ); | |
| 264 | |
| 265 dbFile = wxGetCwd() + wxFILE_SEP_PATH + wxT("db") + wxFILE_SEP_PATH + wxT("hhs.db"); | |
| 266 wxFileName hhs( dbFile ); | |
| 267 t = hhs.GetModificationTime(); | |
| 268 date.Add( t.FormatISODate() ); | |
| 269 | |
| 270 return date; | |
| 271 } | |
| 272 | |
| 253 /* DB整合性チェック */ | 273 /* DB整合性チェック */ |
| 254 wxArrayString CheckDBs( void ) | 274 wxArrayString CheckDBs( void ) |
| 255 { | 275 { |
| 256 wxString gszFile = wxGetCwd() + wxFILE_SEP_PATH + wxT("db") + wxFILE_SEP_PATH + wxT("ccn.db"); | 276 wxString gszFile = wxGetCwd() + wxFILE_SEP_PATH + wxT("db") + wxFILE_SEP_PATH + wxT("ccn.db"); |
| 257 wxSQLite3Database ccndb; | 277 wxSQLite3Database ccndb; |
| 318 stmt.Finalize(); | 338 stmt.Finalize(); |
| 319 ccndb.Close(); | 339 ccndb.Close(); |
| 320 | 340 |
| 321 return result; | 341 return result; |
| 322 } | 342 } |
| 343 |
