Re: Posting the results of a query to an email
| From: | mike karthauser | Date: | Wed, 11 Jun 2003 15:37:37 +0000 |
| Subject: | Re: Posting the results of a query to an email | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28543@lists.php.net to get a copy of this message | ||
on 11/6/03 4:09 pm, mike karthauser at mikek@brightstorm.co.uk wrote:
> I want to select item_code, qty from cart where cookie_id =
> $_COOKIE["cartId"]
>
> //the above select needs work
>
> And then email these to the client which I would do using php's mail
> function.
Partially answering my own question:
$result = mysql_query("select ITEM_CODE, ITEM_TITLE from cart inner join
products on cart.item_id = products.ITEM_ID where cart.cookie_id = '" .
GetCartId() . "' order by products.ITEM_TITLE asc", $db);
This then gives me a result set. What would be the best way to extract the
results to an emailable format, given that there could be one or many items
in the cart table?
Thanks
--
Mike Karthauser
Managing Director - Brightstorm Ltd
Email >> mikek@brightstorm.co.uk
Web >> http://www.brightstorm.co.uk
Tel >> 0117 9426653 (office)
07939 252144 (mobile)
Snailmail >> Unit 8, 14 King Square,
Bristol BS2 8JJ