James,
(B
(BThe consensus of developers here seems to have been not to store binary objects in the 
(Bdatabase. Rather store them in the file system and simply store reference records in 
(Bthe database.  It is much easier this way. If doing it differently is not an option 
(Bfor you hopefully someone else on the list has done this. Unfortunately, I'm pretty 
(Bsure most of us haven't even tried since it is so much simpler to store them in the 
(Bfile system.
(B
(BHope this is helpful.
(B
(B<>< Ryan
(B
(B-----Original Message-----
(BFrom: Will Contact [mailto:[EMAIL PROTECTED] 
(BSent: Monday, December 08, 2003 1:10 PM
(BTo: [EMAIL PROTECTED]
(BSubject: [PHP-DB] mysql + php 
(B
(Bhi!
(B
(BI  am first question of php in this news group. I would like to ask my question about 
(Bphp + mysql. Now I am  programming php+mysql.  I put word, excel, mpeg and any 
(Bbinaries into the mySQL database using php on linux server,But I can take out these 
(Bbinay from mySQL database. I would like to see the files and save my pc from server. 
(BSo how can I take out from these binaries? If you know it how to take out and show it, 
(Bplease teach and help me how!!.
(BThe information table of mySQL is "objects." So here is the program below;
(B
(B// database information
(Bcreate table objects
(B          b_col blob,
(B          name varchar(30),
(B          file_size varchar(30),
(B          file_date datetime
(B}
(B// it works from "insert" SQL  abc.php
(B    $db = mysql_connect("*****", "***", "****");
(B    mysql_select_db("***",$db);
(B    $sql_insert = "INSERT INTO objects(b_col, file_name, file_size,
(Bfile_type,file_date) VALUES
(B('$UploadedFile','$UploadedFile_name','$UploadedFile_size','$UploadedFile_type',now())";
(B
(B   mysql_query($sql_insert);
(B
(B//
(B// But it does not work at. I can not see anything in my browser
(B    $sql_select = "select b_col, file_name, file_size, file_type, file_date from 
(Bobjects where  file_name like 'gball.gif'";
(B        if(!($result=mysql_query($sql_select,$db))){
(B                        die;
(B        }
(B
(B               $file_name = mysql_result ($result,0,"file_name");
(B               echo $file_name; 
(B
(B
(B
(BRegards,
(Bjames
(B
(B_________________________________________________________________
$BM'C#$H(J24$B;~4V%[%C%H%i%$%s!V(JMSN $B%a%C%;%s%8%c!http://messenger.msn.co.jp 
(B
(B--
(BPHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: 
(Bhttp://www.php.net/unsub.php
(B
(B-- 
(BPHP Database Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to