Here's the deal. I currently have a bunch of image directories, about 50, all created on different times and dates. There have been no modifications to them at all, after they have been created they are left alone. The dates they have been created range from early February to now.
I have a table in a MySQL DB that currently stores information about the directories, such as the path. I have added a TIMESTAMP field, and want to put the creation date of each directory into that field.
The problem is this. I have written a PHP script to return all of the rows from my table and get the creation time of the directories. However, when I view the results, I see that for some reason, it only returns 2 separate dates for all 50 records. Now again, these were all created on separate dates, and when I look on the server, that's what it says.
Here is the code:
$SQL = "SELECT ID, setPath FROM sets ORDER BY ID";
$myResult = mysql_query($SQL, $db);
while(list($ID, $setPath) = mysql_fetch_array($myResult))
{
$setTime = date("YmdHis", filectime($setPath);
echo $setTime;
}
The $setTime variable is what I will be putting into the TIMESTAMP field. I have tested this code using the filectime, and filemtime functions, but no go. It still just gives me two separate dates, instead of 50.
I hope this makes sense.