hi,

maybe a better way to do it would be to use tempnam

$fname=tempnam("/www/htdocs/edb/tmp","CSV");
$fp= fopen($fname,"w+");
$filename=basename($fname);

create a var with todays dats in it and then set that as the second
parameter of tempnam.
this will generate unique filenames including the date.

i generate csv files in this manner and then the user downloads them and
renames them to whatever they want.

Steve
> -----Original Message-----
> From: Larry Rivera [mailto:[EMAIL PROTECTED]]
> Sent: 16 May 2001 19:35
> To: bryan; db
> Subject: RE: [PHP-DB] export
> 
> 
> What do you mean by unique for a specified date?
> 
> If you mean to not duplicate data, you can timestamp you 
> entries or use your
> favorite other method then pull a date range and be done with it.
> 
> -----Original Message-----
> From: bryan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 16, 2001 12:33 PM
> To: db
> Subject: [PHP-DB] export
> 
> 
> I have a MySQL database, and a table full of
> guestbook information.
> 
> The client wants to be able to grab files the info
> from that table (as a comma seperated file) and port
> it into a spreadsheet.
> 
> does anyone know how to export from MySQL to a Comma
> seperated file?
> 
> I guess I could do fopen, fwrite, and just make a *.txt file....
> but, is there a way to make it unique for the specified date?
> 
> Thanks for your help
> b-
> 
> 
> 
> [ bryan fitch . programmer . [EMAIL PROTECTED] ]
> 
> 
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to