dTuesday
11-16-2002, 06:26 AM
I am trying to extract only the day out of a MySQL timestamp that I have queried from a DB. I have tried the following, but $cDay always equals Array ( [0] => 31 [1] => 31 [2] => 31 ), which is not correct, since $cDate equals Array ( [0] => 2002-11-01 00:00:00 [1] => 2002-11-09 00:00:00 [2] => 2002-11-30 00:00:00 ).
for ($j = 0; $j<mysql_num_rows($query2); $j++){
$results = mysql_fetch_array($query2);
if ($results["id"]){
$cId[$j] = $results["id"];
$cSub[$j] = $results["subject"];
$cDate[$j] = $results["stamp"];//may need to format this data for Flash
$cDay[$j] = date(j, $results["stamp"]);
}
}
Any ideas?
:confused:
Thnx for the help,
- D
for ($j = 0; $j<mysql_num_rows($query2); $j++){
$results = mysql_fetch_array($query2);
if ($results["id"]){
$cId[$j] = $results["id"];
$cSub[$j] = $results["subject"];
$cDate[$j] = $results["stamp"];//may need to format this data for Flash
$cDay[$j] = date(j, $results["stamp"]);
}
}
Any ideas?
:confused:
Thnx for the help,
- D
