Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A faster way?

Status
Not open for further replies.

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?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top