Jump to content

chris666uk1

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by chris666uk1

  1. please could some one help me i need to limit the query by timestamp for the last 7 days here is my code on the php side <?php $db = @mysql_connect("localhost", "8conv", "*****") or die("Connection Error: " . mysql_error()); mysql_select_db("tempmonitor") or die("Error connecting to db."); $sql = "SELECT *, UNIX_TIMESTAMP(datetime) AS datetime FROM 8conv"; $result = mysql_query($sql); $data = array(); while ($row = mysql_fetch_array($result)) { $temp1[] = array($row['datetime'] * 1000, (int)$row['temp1']);; } $temp1 = json_encode($temp1);
  2. please can you help me i am trying to get my graph to only show last 5 days of data and only the dates and not times thanks for looking <?php /* Connect to the MySQL database */ $db = mysql_connect("localhost", "8conv", "dangun"); mysql_select_db("tempmonitor",$db); /* Build the query that will returns the data to graph */ $Requete = "SELECT * FROM `8conv`"; $Requete = $Result = mysql_query($Requete,$db); ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.