Re: FUNCTIONS
| From: | Georgie Casey | Date: | Mon, 19 Aug 2002 14:51:55 +0000 |
| Subject: | Re: FUNCTIONS | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113231@lists.php.net to get a copy of this message | ||
its supposed to write a MIDI file from some music notes, the start of the
MIDI file is grand but the end has some of the MIDI from the next database
record!
"Jay Blanchard" <jay.blanchard@niicommunications.com> wrote in message
news:002e01c2479f$1dbf6590$8102a8c0@000347D72515...
> [snip]
> i wrote a function do write a file for me on info taken from a db, and
wrote
> a script with a for loop going through every row in the db, and calling
the
> function. so the function is called about 200 times. but i'm getting weird
> results, the files are corrupted. its grand when i just go one at a time.
so
> i'm assuming variable values must have been left set from the las for
loop.
> so how do i clear ALL variables in the function??
> [/snip]
>
> What do you mean by "corrupted"? It should be simple;
>
> Open the file
> while file open
> read a record from the database into the file
> when no more records
> close file
>
> Maybe you need to place a proper newline character at the end of each
record
> or something like that. Can we have some more information to go on?
>
> Thanks!
>
> Jay
>
> ***********************************************************
> * Texas PHP Developers Conf Spring 2003 *
> * T Bar M Resort & Conference Center *
> * New Braunfels, Texas *
> * San Antonio Area PHP Developers Group *
> * Interested? Contact jay.blanchard@niicommunications.com *
> ***********************************************************
>
>