Re: File Upload and MySQL-Please Disregard
| From: | Carl E Shmidt | Date: | Sun, 10 Mar 2002 18:47:06 +0000 |
| Subject: | Re: File Upload and MySQL-Please Disregard | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-17600@lists.php.net to get a copy of this message | ||
Sorry , I accidentally posted the same thing twice. Just diregard this one.
"Carl E Shmidt" <lanvaledsl@earthlink.net> wrote in message
news:20020309150601.8332.qmail@pb1.pair.com...
> I have an admin site where users can upload files. Information about the
> file like file name and song name are stored in a Mysql db.
> Here's a snippet of code:
>
> //add the MP3 meta data to the database
>
>
$mp3ID=addMP3($songName,$isStudio,$HTTP_POST_FILES['userfile']['name'],$user
> name,$password,$host,$databaseName,&$dbErrorArray);
>
> if(// if no errors inserting the meta data into mysql){
>
>
handleupload($DOCUMENT_ROOT,$HTTP_POST_FILES,&$errorArray,"audio","/mp3/");
> if(//errors copying up the file){
>
> //delete the database entry
>
> deleteMP3($username,$password,$host,$databaseName,$errorArray,$mp3ID);
> }
> }
>
>
> The problem is this:
> If there are errors uploading the file, I can see in my debug output that
> the SQL call to delete the MP3 meta data executed, but yet when i check
the
> db using mysql connect, the record still exists in the db. I have to
> manually delete it for the record to disappear. What's going on?
>
>
> Carl
>
>