Re: mail database problem in php

From: Date: Mon, 21 Aug 2000 18:34:16 +0000
Subject: Re: mail database problem in php
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-12779@lists.php.net to get a copy of this message
> I wonder how i can get $test to all the results in my $query, not only one row. > > So I can send all information in the database in one mail. make it an array? $test[i][1] = field1_of_row1; $test[i][2] = field2_of_row2; if it were for me thought I'd get a standard queue class to handle this.. ~Peter > > > > <?php > > include "databas.php"; > $query = "SELECT vidamicdownloads.datum, vidamic.email, vidamic.fnamn, vidamic.enamn, ". > "vidamic.foretag, vidamic.tel FROM vidamic,vidamicdownloads WHERE ". > "vidamicdownloads.userid = vidamic.userid ORDER by vidamic.foretag"; > $result = pg_exec ($conn, $query); > $number = pg_numrows($result); > pg_close($conn); > > WHILE ($i < $number): > $email = pg_result($result,$i,"email"); > $datum = pg_result($result,$i,"datum"); > $fnamn = pg_result($result,$i,"fnamn"); > $enamn = pg_result($result,$i,"enamn"); > $foretag = pg_result($result,$i,"foretag"); > $tel = pg_result($result,$i,"tel"); > > $test = *** WHAT *** > > $i++; > > ENDWHILE; > > mail("info@swebase.com", "Kontakt via hemsidan.", $test ,"From: $dinpost\nReply-To: $dinpost\nX-Mailer: Swebase Network." ); > > ?> > > > > Med vänlig hälsning > Kasper Kristiansson > 042-217785, Fax 0703-831214 > Mobil 070-6203375 (alla dagar 08:00 - 22:00) > > Swebase Network. > http://www.swebase.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#12779) next »