Re: Re: Making a txt file from db data, is it possible?
| From: | Frank Flynn | Date: | Mon, 08 Apr 2002 17:59:27 +0000 |
| Subject: | Re: Re: Making a txt file from db data, is it possible? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18324@lists.php.net to get a copy of this message | ||
Yes, I'd say this is the way to go. As the customer submits the order
simply write out the file as you'd like it. It doesn't take long and you
have all the data in the cart (I'm not sure how you're dealing with the
cart - saving it in the DB, cookies, session variables - but it doesn't
really matter).
Otherwise you could save this in the DB and have a demon type thing
continuously poll the DB for orders not yet sent - but that's more of a
pain and more likely to break as the demon fails but customers don't
notice and think their orders are being processed.
Even so you'd still have to write it the same way. The export or dump
features will only give you the rows of data in a tab delimited format not a
formatted document as you probably want.
Good Luck,
Frank
On 4/8/02 10:40 AM, "Rick Emery" <remery@excel.com> wrote:
> fopen()
> fwrite()
> fclose()
>
> -----Original Message-----
> From: Raymond [mailto:raymol@online.no]
> Sent: Monday, April 08, 2002 12:05 PM
> To: Frank Flynn; php-db@lists.php.net
> Subject: [PHP-DB] Re: Making a txt file from db data, is it possible?
>
>
> Hi!
>
> Ok, I think I maybe have to explain this a little better : )
>
> I have this website that have a webshop that is driven by mysql and php.
> This is working fine, but when a customer puts something into his cart and
> he is sending his order, I would like to send this order by fax to the store
> nearest the customer.
>
> And I have this faxprogram that scan a directory for files and send them as
> a fax. So I was thinking .... I'm not sure if it is possible, but if it is
> possible to write all products in the customers cart into a txtfile. Iwould
> make to send fax, or?
>
> Thankfull for all advices or help : )
>
> Best regards Raymond
> ----- Original Message -----
> From: "Frank Flynn" <frank@declan.com>
> To: <php-db@lists.php.net>
> Cc: <raymol@online.no>
> Sent: Sunday, April 07, 2002 6:02 AM
> Subject: Re: Making a txt file from db data, is it possible?
>
>
>> On 4/6/02 4:12 PM, "php-db-digest-help@lists.php.net"
>> <php-db-digest-help@lists.php.net> wrote:
>>
>>> From: "Raymond Lilleodegard" <raymol@online.no>
>>> Date: Sat, 6 Apr 2002 17:18:07 +0200
>>> To: php-db@lists.php.net
>>> Subject: Re: Making a txt file from db data, is it possible?
>>>
>>> May I use this dump method with a query too? Or is this only for making
> a
>>> hole table into a txt file?
>>
>> By the time I caught this thread there was no mention of the DBMS you
> were
>> using and they are different. Still one trick that usually works is to
>> create a view with the query you want and to dump that view.
>>
>>> Because I'm trying to get a website into a txt file and save it into a
>>> directory on the server to get a order sendt by fax. Or is this a "long
> way"
>>> to go?
>>
>> Sounds like the long way to me. But like I said I just saw this am I'm
> not
>> sure what you're trying to do. I'd be happy to comment further if you
> like
>> just send more details of what you're trying to do.
>>
>> Good Luck,
>> Frank
>>
>>> Regards Raymond
>>>
>>
>>
>
--
Frank Flynn
Poet, Artist & Mystic