[PHP-DB] Re: Image Operations with MySQL

2002-02-06 Thread Leendert Brouwer

http://www.phpbuilder.com/columns/florian19991014.php3

Tim Lan [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,

 I want to save and load images as binaries with a MySQL database, but I'm
 not sure how to do it.  I'm sure this is a very dumb question, but forgive
 me for being a newbie =)


 Tim





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: FIle Uploading to database

2002-02-06 Thread Leendert Brouwer


Todd Williamsen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Well...  thanks to Dan Burner for the script...  BUT

 I cannot get this friggin INSERT statement to execute..  which craps out..

Specific error messages might help more. Use mysql_error() with die() more
to get them.

 I cannot figure it out.  I have been staring at it for about an hour and I
 still cannot figure it out

 here it is:

 $db = @mysql_select_db($db_name, $connection) or die(Could not select
 database);
 $query = INSERT INTO Canidate(FirstName, LastName, Industry, Address1,
 Address2, City, State, Zip, LocationPref, Phone, Email, ResumeUp) VALUES
 ('$FirstName', '$LastName', '$Industry' '$Address1', 'Address2', '$City',
 '$State', '$Zip', '$LocationPref', '$Phone', '$Email', '$ResumeUp2');
 $result = @mysql_query($query, $connection) or die(could not execute
 query);
 $pat = array(#, @, *, , %, @,$,',`);
 $w= '_';
 $ResumeUp2 = str_replace ($pat, $w, stripslashes($ResumeUp));
 exec(cp '$ResumeUp' '/resumes/$ResumeUp2');
 ?

 it errors out on the $result could not execute query

 Let me know if you need more info!

 Thank you!


 Todd Williamsen [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I don't want the file to be stored in the database, but its location.
 
  What I want to do:
 
  Upload a file, it gets stored on the webserver, but its location on the
  server is stored in the database.
 
  Where do I look for something like this?
 
  What data type would I use to store the URL or file location?
 
  Thank you
 
 





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php