Guest_imported
New member
- Jan 1, 1970
- 0
I have the answer, but I want a better answer...
I want a file name that is "test" plus the time of day.
Here is what I came up with. Is there a better way, like with only one line?
$result = mysql_db_query("main","SELECT CURTIME()+0"
;
$row = mysql_fetch_row($result);
$fname = "test" . $row[0];
BONUS: I want to come up with a file name that is unique for each query. I cannot use TEMPORARY. I am thinking of setting up a file with a number in it, and incrementing each time it is used. Then using the name "test" . $counter. Is there a better way?
I want a file name that is "test" plus the time of day.
Here is what I came up with. Is there a better way, like with only one line?
$result = mysql_db_query("main","SELECT CURTIME()+0"
$row = mysql_fetch_row($result);
$fname = "test" . $row[0];
BONUS: I want to come up with a file name that is unique for each query. I cannot use TEMPORARY. I am thinking of setting up a file with a number in it, and incrementing each time it is used. Then using the name "test" . $counter. Is there a better way?