Re: Re: Printing Fields in Database

From: Date: Tue, 07 Oct 2003 02:39:25 +0000
Subject: Re: Re: Printing Fields in Database
References: 1 2  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-22426@lists.php.net to get a copy of this message
Tuesday, October 7, 2003, 12:54:42 AM, Stefan Neufeind wrote: > On 6 Oct 2003 at 16:08, Tomas V.V.Cox wrote: >> Roger Spears wrote: >> >> > Hello, >> > >> > I'm running Red Hat 9 and Apache. I have a script that stores >> > information in a database. I need to "batch" print specific fields >> > based on the dates they were created. I have recently learned that >> > the printer functions in PHP are for windows machines. I was >> > wondering if anyone out there would care to share how they achieve >> > this? How do you print from a database? >> >> <?php >> require 'DB.php'; >> $fp = fopen('/dev/lp0', 'w'); >> $db = DB::connect('mysql://...'); >> $res = $db->getAll('SELECT * FROM mytable'); >> foreach ($res as $row) { >> fputs($fp, explode(', ', $row) . "\n"); >> } >> ?> >> >> If you need something more sophisticated I've hear that Agatha Report >> is able to generate postcript reports from database queries, maybe >> that helps. > Which Agatha are you after? Where could information on this be found? > There is one Agatha-project on sourceforge - but that's about an mp3- > playlist-system :-) Try http://agata.codigolivre.org.br/ -- Tomas V.V.Cox mailto:cox@idecnet.com

« previous php.pear.dev (#22426) next »