f



Insert text file in a text field #2

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 ?

Thank you .

Fab

0
10/18/2007 4:36:14 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

1 Replies
958 Views

Similar Articles

[PageSpeed] 17

Greetings, electric_r@yahoo.it.
In reply to Your message dated Thursday, October 18, 2007, 20:36:14,

eyi> Hallo,

eyi> I have 2 questions:

eyi> with php and mysql :

eyi> 1) How can I insert a text file into a TEXT field of a table  ?

eyi> 2) How can I insert a microsoft word file into a BLOB field of a
eyi> table ?

eyi> Please, could you help me with a simple example ?

This is mostly SQL question.
PHP part may looks like:

$_field = *_sql_escape_string(file_get_contents('/path/to/document'));
*_sql_query("INSERT INTO tablename (fieldname) VALUES ('{$_field}')");


-- 
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

0
anrdaemon (327)
10/21/2007 2:03:53 PM
Reply:

Similar Artilces:

Insert text file in a text field
allo, 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 ? Thank you . Fab ...

Insert text file in a text field ...
Hallo, I have 2 questions: 1) How can I insert a text file into a TEXT field of a table (by an sql instruction) ? 2) How can I insert a microsoft word file into a BLOB field of a table (by an sql instruction) ? Please, could you help me ? Thank you . Fab. On Thu, 18 Oct 2007 06:41:52 -0700, electric_r@yahoo.it wrote: > Hallo, > > I have 2 questions: > > 1) How can I insert a text file into a TEXT field of a table (by an > sql instruction) ? > > 2) How can I insert a microsoft word file into a BLOB field of a table > (by an sql instruction) ? > > Please, could you help me ? This is a task for the application program, not the database itself. -- A way of life that is odd or even erratic but interferes with no rights or interests of others is not to be condemned because it is different. -- Chief Justice Warren E. Burger electric_r@yahoo.it wrote: > Hallo, > > I have 2 questions: > > 1) How can I insert a text file into a TEXT field of a table (by an > sql instruction) ? > > 2) How can I insert a microsoft word file into a BLOB field of a table > (by an sql instruction) ? > > Please, could you help me ? > > Thank you . > > Fab. Look at the LOAD_FILE() function in the manual On 18 Oct, 14:41, electri...@yahoo.it wrote: > Hallo, > > I have 2 questions: > > 1) How can I insert a text file into a TEXT field of a table (by an > sql instruction) ? > > 2) How can...

Insert text file in a text field #3
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 ? Thank you . Fab 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 ...

Pasting Text files into a text field?
I want to past a text file into a text field but it looses it's format. It should appear in a table layout, is there a way round this? Thanks Ernie -- --------------------------------------------------------------------- "Are you still wasting your time with spam?... There is a solution!" Protected by GIANT Company's Spam Inspector The most powerful anti-spam software available. http://mail.spaminspector.com In reply to mSzjb.11$UY1.9@news-binary.blueyonder.co.uk on 10/16/03 4:41 PM by Ernie Faulkner ernie-NO-SPAMfaulkner@blueyonder.co.uk: Hi Ernie, To paste the ...

Reading Text File, Text Scrolling and erase line from a text file
Hi , How can I Reading Text File, then Text Scrolling by means of keys "page UP" "page Down" and erase a specific line from a text file , when press "F2" key? Best Regards, Lidia from Poland -- ========================================= Pozdrawiam Lidiaa Lidiaa schrieb: > Hi , > > How can I Reading Text File, then Text Scrolling by means of > keys "page UP" "page Down" and erase a specific line from a text > file , when press "F2" key? > > ...

FileMaker Pro 9 OS X Defining text fields and numerical fields to aviod the quote in the fields to avoid it from exporting out to an Excel Spreadsheet or Text File.
I have been reading the help files in FileMaker Pro 9 about Text formats but have yet to find my solution, perhaps there is not one or it is a formula that is beyond my scope at this time. I have fields that are strictly numbers and the fields have been defined for numbers and I have no " around the text. I have field I have defined as text for it is a mix of text and number or text and non text characters such as / or ? or . or , or * and the like and they get " " in the field. I want to prevent that. How do I do this where none of my input gets the open and closing double ...

inserting certain text from text file to matlab
i am using a software which outputs me a text file with 1000 lines of data. I specifically need certain lines (lets say line 100- 150), and input them into matlab. These lines actually consists of columns (lets say "X-Axis" "Y-Axis" "Z-Axis"). The first line does include the title of these columns. I want matlab to read these lines, and then using a code...generate some graphs for me. Any help would be appreciated. Anuj Anuj wrote: > i am using a software which outputs me a text file with 1000 lines of > data. I specifically need certain lines (lets say ...

read from Text file using VB and Insert into SQL table until eof text file reach
Dear All, my text file like following, a1, b1, c1, d1, e1 a2, b2, c2, d2, e2 a3, b3, c3, d3, e3 a4, b4, c4, d4, e4 ................. and im going to insert this values into SQL Tables with columns, [a, b, c, d, e] how im going to do so? i use below src code to do but i can not get the next line and next line of text file until it finished insert Private Sub mot_Click() 'Shell ("C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE c:\fisherdb. mdb /x ImportOpsNilai") 'frmPicCd.Show Dim db_connect ' Path = App.Path & "\ERP consumable code.xls" ...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over there you can meet other users of Bentley products, exchange ideas, and discuss a wide range of technical subjects. These groups are an excellent technical resource for all users of Bentley products and services. Hope to see you there! For more information take a peek at this page: http://selectservices.bentley.com/discussion/index.htm -- Best Regards, Inga Morozoff [Bentley] www.askinga.com "jgonzales24" <jgonzales24@cox.net> wrote in message news:xcLMb.13975$zs4.2376@fed1read01... > I'm rather new to ustation and am having trouble finding replacements for > all of my Acad lisp routines. One that I'd like to find changes a selected > text string to read like the second selected text string. I realize this > can all be done in the text editor but it's not all that quick. Does anyone > know of a macro or mdl whi...

Insert text from file #2
There was one post recently regarding "Insert text from file" option. I added one similar feature to the Custom Quote Plugin. It's called "Insert Quoted Text from File". To insert the text without the quotation word or sign, just leave the relevant field blank. http://brana.users.sbb.co.yu/quote.zip http://brana.users.sbb.co.yu/quote.txt -- mailto:bujenovicAThotmail.com http://brana.users.sbb.co.yu/index ...

Insert carriage return in a text field to warp text down
I've imported data from a database - containing separate fields for name, address and postcode, into one single text field in another database (I know that's rotten database practice, but I was asked to do this at work). I concatenated the fields in the "donor database then mapped the single concatenated field to the recipient single text field on import. I now have a field containing name, address and postcode, with spaces between each element(I inserted them), but of course there is no wrapping. I now have (example) MrTest Name Test Address TestPostcode in a single text field...

Inputting text from a text file into a 2 -D array
hey, I am beginer to C++ programing. I am working on a project called the "maze Problem" First of all I am required to read a text file in( which is the maze) and store it into a 2 dimentional vector. This is what I have till now: #include <iostream> #include "maze.h" #include <vector> #include <fstream> using namespace std; int main() { typedef vector< vector<char> > vectorMaze; //get the name of the file ifstream mazeFile; cout<< "Enter name of file name with the maze: "<<endl; while(!mazeFile.eo...

Reading many fields/text/data from a single text file
I tried it with RTF, I am able to read the entire content. Same goes with the TXT file. But is VB able to allow you to read various data from a single text file? > I tried it with RTF, I am able to read the entire content. > Same goes with the TXT file. But is VB able to allow > you to read various data from a single text file? The only thing your post has told us is that you are having some kind of problem; but not the details of what that problem is. How big is the file you are trying to read? What is happening when you can't read the entire contents (for example, are you get...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

Viewing text files in GUI Edit Text boxes #2
Hi, I am importing a text file containing numeric and character or just numeric data (of unknown size) and I want to view the contents in a GUI Edit Text box. I've thus far managed to format a string of the numeric only file and view it: datastr=sprintf('%-12.3f',handles.rawdata); set(handles.fdesc,'Visible','on','String',datastr) But, say the file is 20x20 will display the first four numbers of each column then move to the next line and display the next 4, etc. Is there anyway to: a) Add breaks in the data to show the user that the next set of data is f...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What a...

ISQL is truncating contents of text field sent to text file.
Under SQL 2000 I have a table that consists of a single column of text type, each record holds about 15-25,000 chars. This data happens to be an xml, and I want to write this records to a text file. In order to accomplish this i'm using ISQL.exe, but i'm finding that some of the text type records aren't being written complete (truncated at 8k chars). I have tried increasing the width of columns (-w), and the maximum text size (-x) {the maximum length of text data to return} parameters for executing ISQL with no luck. High values make it crash. Problems: * If the data is longer t...

inserting text files as memopad documents #2
I'm trying to insert multple text documents into the palm memopad (as documents, of course). Is there a way to do this under Windows (alas)? In the best scenario (I guess), these would be inserted into the windows machines' files, then on sync, would be copied over to the palm. In the next best, a bunch of files would be bundled together and converted to a memopad archive (and then manually installed from the desktop). Finally, least best would be something like install-memo from pilot-link, but running under windows instead. Have I missed anything? Is this doable? Of course, th...

Get date from text/php-file #2
Allright, thank you guys!! I got it going. Now i have another question; Is there a way to link a date to a persons name, so i can get the pop-up, and the pop-up then automatically grabs the right name, and displays it? Thanks in advance.,.. "krunkelgarten" <krunkelgarten@hotmail.com> wrote in message news:8767e62e.0312301404.424614af@posting.google.com... > Allright, thank you guys!! > I got it going. > Now i have another question; > > Is there a way to link a date to a persons name, > so i can get the pop-up, and the pop-up > then automatically grabs th...

"Insert" (not append) new text segment to an existing text file
How to "Insert" (not append) new text segment to an existing text file? Assume that we have text file as shown below; Elvis Sofia Kylix BCB--> How to insert here? Atten BuilderX Roma Together Cairo sm wrote: > How to "Insert" (not append) new text segment to an existing text file? > > Assume that we have text file as shown below; > Elvis > Sofia > Kylix > BCB--> How to insert here? > Atten > BuilderX > Roma > Together > Cairo This has nothing to do with the ...

concatenating multiple text files into one text file
Hello all, I have a huge number of text files like : spectrum1_300_315.csv spectrum1_315_331.csv spectrum1_331_364.csv spectrum1_364_386.csv spectrum1_386_401.csv ...................................... ....................................... each file contains some headerlines at the beginning and data in 2 columns. I want to concatenate the data of the files into one text file .Can anyone hel me pls?thank u in advance. ...

Failed to write to a text file (text file is RW)
Hi, I dig up the following script. Added a simple HTML file with a form field named "vote" and have it send to the following php script. However, it failed to write to the poll_result.txt file. Why? Thanks as usual. <?php $vote = $_REQUEST['vote']; //get content of textfile $filename = "poll_result.txt"; $content = file($filename); //put content in array $array = explode("||", $content[0]); $yes = $array[0]; $no = $array[1]; if ($vote == 1) { $yes = $yes + 1; } if ($vote == 0) { $no = $no + 1; } // debug echo $yes; echo $no; // ou...

Converting A Unicode Text File to An ASCII Text File
We have a large number of text files built in Unicode that we need to be read by SAS. SAS does not read Unicode text. To convert the Unicode text to ASCII text we did the following: A Unicode text file adds an additional blank space to each character. To remove this blank character, you can use the code below. The hexidecimal value '00' is a blank character. So remove it using the SAS statement '00'x. The 'x' tells SAS you are reading hexidecimal. Use RECFM=N to tell SAS that you are reading a stream of data that will not conform to a typical file structure. SAS will ...

Text in images to a text file
Hello, Does anyone know of any software for Linux which converts text in images to a text file. I have loads of paper documents that I intend to scan. The contents of these documents needs to eventually end up on a web site but as text. Darren <bobblebob@gmail.com> wrote in message news:1151612491.407262.124690@75g2000cwc.googlegroups.com > Does anyone know of any software for Linux which converts text in > images to a text file. I have loads of paper documents that I intend > to scan. The contents of these documents needs to eventually end up > on a web site but as text....

Web resources about - Insert text file in a text field #2 - comp.lang.php

Package insert - Wikipedia, the free encyclopedia
In the United States, the Food and Drug Administration (FDA) determines the requirements for patient package inserts. Other national or international ...

Inserts Wallpapers & Photos on the App Store on iTunes
Get Inserts Wallpapers & Photos on the App Store. See screenshots and ratings, and read customer reviews.

Please Insert Coin - Flickr - Photo Sharing!
Explore arsheffield's photos on Flickr. arsheffield has uploaded 6582 photos to Flickr.

Ice Cube-I'm Scared (Insert)-The Predator - YouTube
Artist:Ice Cube Title:I'm Scared (Insert) Album:The Predator Year:1992

Google halts public map edits after prankster inserts image of Android robot urinating on Apple logo
Google sidelines crowd-sourced map-making tool to prevent embarrassing edits.

Dear [insert name], Qantas takes your complaint very seriously, honest
What's more annoying than being delayed nine hours on a long-haul flight between Sydney and Los Angeles, while stuck in a seat with a broken ...

Ice worth $1 billion seized in gel push-up bra inserts and art supplies
More than $1 billion of ice has been seized after law enforcement agencies broke up a major drug syndicate, federal Justice Minister Michael ...

ISIS inserts disturbing images into N.L. vote Twitter chatter
Note: The CBC does not necessarily endorse any of the views posted. By submitting your comments, you acknowledge that CBC has the right to reproduce, ...

Updates for Google Docs & Slides let you insert & quickly edit images on Android/iOS
Google is today rolling out updates to its Google Docs and Slides mobile apps bringing the ability to insert images directly from the app on ...

Gmail for iOS updated with ‘Insert from Drive’ and ‘Save to Drive’
Google has released an update to Gmail for iOS this afternoon that brings “Insert from Drive” and “Save to Drive” functionality to the iPhone ...

Resources last updated: 2/29/2016 2:00:48 PM