What I need exactly is to send the outputs from queries made in the command line of postgresql to an plain text file, cvs or something like that, so the function suggested frwrite don't work for that case because it's from the command line. Than'ks Norma R -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php