|
Posted by Rik Wasmus on 10/18/07 17:29
On Thu, 18 Oct 2007 18:36:59 +0200, <electric_r@yahoo.it> wrote:
> Hallo,
>
> I have 2 questions:
>
> with php and mysql :
>
> 1) How can I insert a text file into a TEXT field of a table ?
>
> 2) How can I insert a microsoft word file into a BLOB field of a
> table ?
>
> Please, could you help me with a simple example ?
mysql_query("INSERT INTO tablename (fieldname) VALUES
('".mysql_real_escape_string(file_get_contents('/path/to/file'))."')");
--
Rik Wasmus
Navigation:
[Reply to this message]
|