~jstys-z/helioviewer.org/client5

« back to all changes in this revision

Viewing changes to phpClasses/server/ImgIndex.php

  • Committer: V. Keith Hughitt
  • Date: 2008-07-09 18:59:47 UTC
  • Revision ID: hughitt1@kore-20080709185947-lsdp2jwnuc1bs5nd
nightly build 07-09-2008: re-writing db population script to fix errors during tile processing

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
  }
23
23
  */
24
24
 
25
 
  /*
26
 
   * NOTE: Because MySQL and Javascript/PHP seem to use a different UTC Offset (-0400 vs -0500), images are being returned that are off
27
 
   *       by one hour. Until a better solution is found, I will temporarily add one hour (3600 seconds) manually to correct for this 
28
 
   *       difference.
29
 
   *       
30
 
   *       -Keith 06-27-2008 
31
 
   */
32
 
  
33
25
  public function getProperties($imageId) {
34
26
    $query = "SELECT image.id AS imageId, filetype, measurement.name AS measurement, measurementType.name AS type, unit, 
35
27
                                                detector.name AS detector, detector.opacityGroupId AS opacityGroupId, opacityGroup.description AS opacityGroupDescription,
36
28
                                                instrument.name AS instrument, observatory.name AS observatory, 
37
 
                                                UNIX_TIMESTAMP(timestamp) - UNIX_TIMESTAMP('1970-01-01 00:00:00') +3600 AS timestamp
 
29
                                                UNIX_TIMESTAMP(timestamp) - UNIX_TIMESTAMP('1970-01-01 00:00:00') AS timestamp
38
30
                                        FROM image
39
31
                                                        LEFT JOIN measurement on measurementId = measurement.id
40
32
                                                        LEFT JOIN measurementType on measurementTypeId = measurementType.id
70
62
    }
71
63
 
72
64
    $query .= " ORDER BY timediffAbs LIMIT 0,1";
73
 
    //echo date("O") . "<br><br>$query<br><br>";
 
65
    //echo date("O");
 
66
    //echo "<br><br>$query<br><br>";
 
67
    
74
68
    $result = $this->dbConnection->query($query);
75
69
    return mysql_fetch_array($result, MYSQL_ASSOC);
76
70
  }