[PHP-DB] mysql and file upload problems

2002-03-09 Thread Carl E Shmidt
I have a standard multipart/enc form to allow users to upload files. Pseudocode: //call function to insert file details into the database if( NOT file upload attack, wrong file type, etc.){ //copy the file to the permanaent location } else{ //delete the record of file

[PHP-DB] File Upload and MySQL

2002-03-09 Thread Carl E Shmidt
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

Re: [PHP-DB] Hosting - what's needed to handle 650K queries?

2002-03-09 Thread Jerry Bell
Based on my experience, I see about 90% of hits during the week (as you said). 80% of the daily hits occur during a 10 hour period during the day. At 600k pages/month, that's about 13 pages per second average, during the day. Since hits aren't evenly distrubuted, you can plan on about 2 to 3

Re: [PHP-DB] Hosting - what's needed to handle 650K queries?

2002-03-09 Thread Jerry Bell
Based on my experience, I see about 90% of hits during the week (as you said). 80% of the daily hits occur during a 10 hour period during the day. At 600k pages/month, that's about 13 pages per second average, during the day. Since hits aren't evenly distrubuted, you can plan on about 2 to 3

Re: [PHP-DB] mysql and file upload problems

2002-03-09 Thread Robert Weeks
Why don't you just do the sql insert *after* the file upload function?: Pseudocode: if( NOT file upload attack, wrong file type, etc.){ //copy the file to the permanaent location //call function to insert file details into the database } else{ //echo error to user

[PHP-DB] Re: two different MySQL connections without always select_db?

2002-03-09 Thread Rod Wilkinson
I thought I had a solution for you until I read the documentation saying that mysql_db_query() is now deprectiated. This is a concern since we have been using the mysql_db_query() function (and still use with v.4.1.2) on our site. This function works as following: // Connect to dbs