I've RTM, but I'm really not sure how to use the strtotime function to convert a date from UTC to unix time, because I'm not sure what variables go where. Here's the specific code:
$value = $_POST["Attribute"];
$Customer = $_POST["customer"];
$table = $_POST["table"];
$date = "date";
$myData = new pData();
$myquery = "SELECT `$value`,`$date` FROM `$table` WHERE `Customer` LIKE '$Customer' ORDER BY `date`";
$result = mysql_query($myquery,$connect);
while ($row = mysql_fetch_array($result))
{ $myData->AddPoints($row["$value"],"serie1");
$date2 = date($date,strtotime($row["date"]));
$myData->AddPoints($row["$date2"],"date"); }
arrghhh, I can barely even see anymore. I think the problem is the penultimate line, I just don't know what slots in where. The date column in my database is UTC, and then I need to pass that value to pChart using the $mydata->AddPoints function. That works, but the data is messed up.
Can anyone help me?