RE: [PHP-DB] mail()
| From: | Boaz Yahav | Date: | Sat, 05 Jul 2003 20:32:34 +0000 |
| Subject: | RE: [PHP-DB] mail() | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-29097@lists.php.net to get a copy of this message | ||
Assuming you use MySQL (for example...) do something like :
<?
$result=mysql_query("SELECT * FROM Table") or die(mysql_error());
While($row = mysql_fetch_object($result)) {
$MyVar .= $row->MyField;
}
mail("me@somedomain.com","this is may
email",$MyVar,"From:me@mydomain.com");
?>
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.
-----Original Message-----
From: Phil Dowson [mailto:dowson@mchsi.com]
Sent: Friday, July 04, 2003 2:42 PM
To: php-db@lists.php.net
Subject: [PHP-DB] mail()
Hi,
Could someone let me know if it is possible to pass a resultset of a
query to a single variable so it can be included as the message part of
the mail function?
Thanks!
Phil Dowson
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php