f



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

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

10 Replies
842 Views

Similar Articles

[PageSpeed] 48

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
0
10/18/2007 5:29:54 PM
On Thu, 18 Oct 2007 19:29:54 +0200, Rik Wasmus  
<luiheidsgoeroe@hotmail.com> wrote:

> 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'))."')");

Hmmm,
or: mysql_query("INSERT INTO tablename (fieldname) VALUES  
(LOAD_FILE('/path/to/file'))");

For this you'd have to make sure:
- the database is on the same host as the file
- you have the FILE privilege
- the file is readable
- the filesize is less than max_allowed_packet bytes

-- 
Rik Wasmus
0
10/18/2007 5:33:25 PM
On Oct 18, 6:36 pm, electri...@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 ?
>
> Thank you .
>
> Fab

I wrote a tutorial on uploading files into a mysql database.
You can read it here :http://wiki.greenquery.com/doku.php?
id=understanding_php_classes#creating_uploadhandler

I hope it's for some help to you.

//Michael

0
10/18/2007 6:36:31 PM
On 18 Oct, 17:36, electri...@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 ?
>
> Thank you .
>
> Fab

Do not multi-post. Cross-post if you must but don't multi
post It wastes people's time. http://www.blakjak.demon.co.uk/mul_crss.htm.

You have had answers from people on 2 different groups. If you had
cross posted instead of multi-posting, everyone would have seen that
the question had been answered.

0
paul_lautman (2109)
10/19/2007 9:09:25 AM
On 18 Ott, 19:33, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
> On Thu, 18 Oct 2007 19:29:54 +0200, Rik Wasmus
>
>
>
> <luiheidsgoe...@hotmail.com> wrote:
> > On Thu, 18 Oct 2007 18:36:59 +0200, <electri...@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'))."')");
>
> Hmmm,
> or: mysql_query("INSERT INTO tablename (fieldname) VALUES
> (LOAD_FILE('/path/to/file'))");
>
> For this you'd have to make sure:
> - the database is on the same host as the file
> - you have the FILE privilege
> - the file is readable
> - the filesize is less than max_allowed_packet bytes
>
> --
> Rik Wasmus


Thank you very much .

Another question:
after I put a text file in a text field,
then, how can I read this field content and put it into
a php variable ?

Many thanks .

Fabrizio

0
10/19/2007 11:59:13 AM
electric_r@yahoo.it wrote:
> On 18 Ott, 19:33, "Rik Wasmus" <luiheidsgoe...@hotmail.com> wrote:
>> On Thu, 18 Oct 2007 19:29:54 +0200, Rik Wasmus
>>
>>
>>
>> <luiheidsgoe...@hotmail.com> wrote:
>>> On Thu, 18 Oct 2007 18:36:59 +0200, <electri...@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'))."')");
>> Hmmm,
>> or: mysql_query("INSERT INTO tablename (fieldname) VALUES
>> (LOAD_FILE('/path/to/file'))");
>>
>> For this you'd have to make sure:
>> - the database is on the same host as the file
>> - you have the FILE privilege
>> - the file is readable
>> - the filesize is less than max_allowed_packet bytes
>>
>> --
>> Rik Wasmus
> 
> 
> Thank you very much .
> 
> Another question:
> after I put a text file in a text field,
> then, how can I read this field content and put it into
> a php variable ?
> 
> Many thanks .
> 
> Fabrizio
> 
> 

http://www.php.net/manual/en/ref.mysql.php

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

0
jstucklex (14659)
10/19/2007 12:24:20 PM
On Thu, 18 Oct 2007 09:36:59 -0700, electric_r 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  ?

textarea value="<?php echo thefile; ?>" something like that

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

wouldn't it be more practical to just store the file's path instead of the file itself?
> 
> Please, could you help me with a simple example ?
> 
> Thank you .
> 
> Fab

0
henri3056 (15)
10/19/2007 12:30:23 PM
Henri wrote:
> On Thu, 18 Oct 2007 09:36:59 -0700, electric_r 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  ?
> 
> textarea value="<?php echo thefile; ?>" something like that
>

He's talking about a table in a SQL database.

>> 2) How can I insert a microsoft word file into a BLOB field of a table ?
> 
> wouldn't it be more practical to just store the file's path instead of the file itself?

Not necessarily.  Often times I'll store files in a database.  A lot of 
good reasons to do so (which should be discussed in a SQL newsgroup).

>> Please, could you help me with a simple example ?
>>
>> Thank you .
>>
>> Fab
> 
> 


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

0
jstucklex (14659)
10/19/2007 12:53:38 PM
Henri wrote:
> On Thu, 18 Oct 2007 09:36:59 -0700, electric_r 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  ?
> 
> textarea value="<?php echo thefile; ?>" something like that
> 
>> 2) How can I insert a microsoft word file into a BLOB field of a table ?
> 
> wouldn't it be more practical to just store the file's path instead of the file itself?

Actually it isn't.I ended up with EVERYTHING - files and images - in the 
database simply because backing up the database then backs up EVERYTHING.

But I wouldn't use a text area to input a file..use the FILE input command.

>> Please, could you help me with a simple example ?
>>
>> Thank you .
>>
>> Fab
> 
0
The
10/19/2007 10:26:07 PM
On Fri, 19 Oct 2007 23:26:07 +0100, The Natural Philosopher wrote:

> Henri wrote:
>> On Thu, 18 Oct 2007 09:36:59 -0700, electric_r 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  ?
>> 
>> textarea value="<?php echo thefile; ?>" something like that
>> 
>>> 2) How can I insert a microsoft word file into a BLOB field of a table
>>> ?
>> 
>> wouldn't it be more practical to just store the file's path instead of
>> the file itself?
> 
> Actually it isn't.I ended up with EVERYTHING - files and images - in the
> database simply because backing up the database then backs up
> EVERYTHING.
> 
ok, good point. I was just not thinking in terms of back ups.

> But I wouldn't use a text area to input a file..use the FILE input
> command.

that was my misanderstanding the first question. 
> 
>>> Please, could you help me with a simple example ?
>>>
>>> Thank you .
>>>
>>> Fab
>>

0
henri3056 (15)
10/20/2007 3:05:12 PM
Reply:

Similar Artilces:

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...

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" Dim objFSO Dim objFile, objTextStream Dim strContent Const ForReading = 1 Dim FileName, IEPath, strC1 As String FileName = "U:\bureport\buops\RepNilai.txt" Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFile(FileName) Set objTextStream = objFile.OpenAsTextStream(ForReading, TristateUseDefault) If objFSO.FileExists(FileName) Then Set objFile = objFSO.OpenTextFile(FileName, ForReading) 'While Not objFile.EOF strC1 = objFile.ReadLine Dim word ReDim word(2) word = Split(strC1, ",") ' Dim t1, t2, t3 As String ' MsgBox RTrim(LTrim(word(44))) ' t1 = Replace(word(0), """", "...

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 ...

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 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). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

"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. ...

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 treat the file as a very long single record. data _null_; infile 'c:\xmlfile.xml' recfm=n; file 'c:\ascifile.txt' recfm=n; input c $1.; if c ne '00'x then put c $1.; run; ...

rich text in text field
I am using GUIDE for my UI work. (MATLAB 2009b) I would like to display some rich-text (font size change, bold, underline etc) inside a panel. Can I put some rich-text, using html tags, in a text field? For example: <html><b> this is bold </b></html> I know you can do it in table headers. Thank you. ...

text field only for text
Hi I would like some help about the following : I have a text field and I don't want it contains any numbers. How can I limit this situation ? So far, I couldn't find literature exacly about this here in the newsgroup. TIA Paulo "Paulo Rodrigues" <amigo.alf@netvisao.pt> wrote in message news:<newscache$kgmtmh$bb1$1@newsfront4.netvisao.pt>... > Hi > > I would like some help about the following : > > I have a text field and I don't want it contains any numbers. How can I > limit > this situation ? > > So far, I couldn't find literature exacly about this here in the newsgroup. > > TIA > Paulo Paulo, the online help is your FRIEND. Private Sub Text0_KeyPress(KeyAscii As Integer) If KeyAscii >= 48 And KeyAscii <= 57 Then KeyAscii = 0 End If End Sub Just put this code in the KeyPress event of whatever text field you do not want to contain numbers. OR you could glue thumbtacks to the number keys on all your users keyboards... Thought I'd add my 2 cents worth. Avoid magic numbers, especially when you can use builtin VBA constants. The following is a little more intuitive to read and a future developer does not have to lookup 48 and 57 to see exactly what is being blocked. Private Sub Text2_KeyPress(KeyAscii As Integer) 'Cancel any numeric keys If KeyAscii >= vbKey0 And KeyAscii <= vbKey9 Then KeyAscii = 0 End If End Sub The above solu...

Text filtering in a text field
Hi, am new to SKILL and would like to do some text checking and filtering for illegal characters in the text field. Meaning I have a text field in my form that is only to be with text, not any of the symbols (i.e. ~!@#$%^&* and so on). When the user input and saved the fields, those characters won't be allowed to be saved. What will be the best way to filter out only text? Only numbers? Terence <terrylau77@gmail.com> writes: > Hi, am new to SKILL and would like to do some text checking and > filtering for illegal characters in the text field. Meaning I have a > text f...

matrix and text to a text file
Hi, I know some similar question have been solved before but I have been reading for a while and I didn't find the answer of my question so, I ask you. I want to create a text-file (.txt) where I will have some text and some matrixs. The format that i want is something like that: -Title- Name1. Name2. power(dbm): big matrix (12000X400) aprox frequency(hz) vector(1x12) aprox So, i created a m-file that can do this writing with fprintf every single character on the file using lots of for loops. It works good but if the matrix is that size it could take a time (about 7 min...

How to format a text file just like the RFC-text files?
I want to make some document go like these, what tools can help? Any help would be nice, thanks! BLIOGRAPHY ........................................... 34 APPENDIX A. EXAMPLES ............................................... 36 B. SIMPLE FIELD PARSING ................................... 40 C. DIFFERENCES FROM RFC #733 .............................. 41 D. ALPHABETICAL LISTING OF SYNTAX RULES ................... 44 August 13, 1982 - i - RFC #822 ^L Standard for ARPA Internet Text Messages PREFACE By 1977, the Arpanet employed several informal standards for the text messages (mail) sent among its host computers. It was felt necessary to codify these practices and provide for those features that seemed imminent. The result of that effort was Request for Comments (RFC) #733, "Standard for the Format of ARPA Network Text Message", by Crocker, Vittal, Pogran, and Henderson. The specification attempted to avoid major changes in existing software, while permitting several new features. The framework severely constrains document tone and appear- ance and is primarily useful for most intra-organization communi- cations and well-structured inter-organization communication. It also can be used for some types of inter-process commun...

Re: Converting A Unicode Text File to An ASCII Text File
Mike, SAS does not read Unicode text. It is not true encoding=utf8 exist HTH Andre I tried upon this contents (a french one saved in utf8) but showed here in windows Nom,Adressé "Bob","cité Bergère" "Ann","impasse Dôme" with this code under sas windows options validvarname=any; filename a "z:\utf8.csv" encoding=utf8; PROC IMPORT OUT= WORK.PAPER3 DATAFILE=a DBMS=CSV REPLACE; GETNAMES=YES; DATAROW=2; RUN; the results are Nom Adress� Bob cit� Berg�re Ann impasse D�me But perhaps you have another problem Bachenot a �crit : > 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 treat the file > as a very long single record. > > data _null_; > infile 'c:\xmlfile.xml' recfm=n; > file 'c:\ascifile.txt' recfm=n; > input c $1.; > if c ne '00'x th...

Read a non text file
How can i convert a weird looking file to text file. I know the main info is stored in the file which looks like below. "����<t���Jч�ĉTV��y�rr��Ph"e~Wm>�E�0Y'p�=C�&�rؙ�<t�Fx�Zo$�+T��=���H Or�r6�S��m&7<�p�q��� u����w}�jlꥎ+_�����Z�?��v��ȉ�XC R�}�_�׍�:�$)�o}��NʨW\&���I@b�#T�B��8���J��CL�ypr\�]R���p\��S�XRҏ�f&?/��� 2�t�_��x���bG���Z�D�v�s [�"��N�# Ѡ�@)�����h'&%�(�)��c�ͼA ���zUZjLRyu�P̤� ��� �W��e�@1'�(��u-nG��p��2_�� T&�6+� _� d�(1Z�E@���h�F�z �~x�fG���s�b�/-+�@��0�%��6�wu�=��z���Y�0...

how to read data from text file liine-by-line and insert into table with predefined fields using LABSQL
i have downloaded and installed labSQL; there's an example of of inserting&nbsp;data into a table. How do i configure this vi to insert data directly from a text file into a table? Sample data file &nbsp; E0070000192AC8FF 00:32:30 E0070000242179B7 00:32:33E007000001BC7E8C 00:32:35E0070000242179B8 00:19:04E0070000192AC8FE 00:32:30 I have no control over the contents(format) of this file , as its been transferred from a linux box via http. Is there a way to read this data line by line and insert into a table , with&nbsp; each line parsed into 2 fields( TAGID, READ TIME) .so for example, for the first line, i want to store E0070000192AC8FE in TAGID field and 00:32:30 in the READ TIME field.How do i do this? Thanks ...

Loading text files into a text attribute
Hello folks, I have the following problem: I have a bunch of text files, I want to load them into a table where each file will be stored in one row. Question 1: Is there any way how to do this in psql? AFAIK the \copy command interprets \n as a new line and so I can't get it done what I want. So I wrote a C program that parses my text files and anywhere it sees a \n it puts \\n and then concatenates the files, etc. - quite complicated. Question 2: Is there a simpler way of doing this? Thanks in advance Zoltan ---------------------------(end of broadcast)------...

Pulling out lines of text from a text file
Hi everybody, I'm looking to write a Catalyst model to basically use a newline delimited database, so that each line of the text file corresponds to a datum. My question isn't about the module per se, but on smart algorithms to pull a single line of text from an arbitrary text file. I know the following would work: #!/usr/bin/perl use warnings; use strict; print "Enter a file\n"; my $file = <STDIN>; print "Enter a number\n"; my $number = <STDIN>; my @array; open FILE, "$file"; while (<FILE>) { push @array; } close FILE; print $a...

Opening and writinging text into text files.
ok heres the problem, 1. Design a program to: � Open a text file, � Display the contents to the user, � Sort the list with regards to A+ to E-, � Update the display, � Save the sorted list to a text file. Below is a sample of the text file: AB0123 IPT B- AB0154 IPT A+ AB0187 IPT D+ AB0201 IPT B+ AB1031 IPT C+ now i have no idea on how we are to do this, it is a revision question for one of my ipt tests, and it needs to be done in VB 6, please help!! Callum Ginty writes: > now i have no idea on how we are to do this, it is a revision > question for one of my ipt tests, and it needs t...

redirect text to file; text widget
I've loaded text from a file into the text widget, and having edited it would like to redirect it back into a file, but haven't found a handle for it. If there was an attribute such as the "-textvariable" option for the entry and label widgets, I could echo it into a file from another widget (button, etc). Thanks ..t get 0 end "John Peters" <john@jpeters.net> wrote in message news:20060701143102.70526542.john@jpeters.net... > > I've loaded text from a file into the text widget, and having edited it > would like to redirect it back into a file, but haven't found a handle for > it. If there was an attribute such as the "-textvariable" option for the > entry and label widgets, I could echo it into a file from another widget > (button, etc). Thanks Usman, Your solution is incorrect. The first character in a text index is 1.0, not 0. Usman Muzaffar wrote: > .t get 0 end > > "John Peters" <john@jpeters.net> wrote in message > news:20060701143102.70526542.john@jpeters.net... > >>I've loaded text from a file into the text widget, and having edited it >>would like to redirect it back into a file, but haven't found a handle for >>it. If there was an attribute such as the "-textvariable" option for the >>entry and label widgets, I could echo it into a file from another widget >>(button, etc). Thanks > > >...

converting a text file into an "insert into ..." file
Hi, I have a csv delimited file that I'd like to 'insert into some_table table values ...' file. Thus I have a file where each row is of the sort: value1, value2, value3, value4 and I'd like to convert the file into a file where each row looks like:: insert into some_table values (value1, value2, value3, value4) How may I efficiently do this? Thanks for your help. gk In case you need escaping there is a module for parsing CSV in stdlib. http://www.ruby-doc.org/stdlib/libdoc/csv/rdoc/index.html otherwise just ruby -ne 'puts "insert into some_table values (#{$...

insert text from one file into another (multiple files)
Hi, Using GNU Bash, version 3.00.16(11)-release (i686-pc-cygwin) on Windows XP I have a group of files in a directory. (my working group). I also have a group of files in another directory, with corresponding filenames. (my add_in group) For each file in my working group: I would like to insert immediately after a specific line, the entire text contained in the file from my add_in group. How can I accomplish this? Thanks Jeff Higgins 2006-01-16, 10:26(-06), Jeff Higgins: [...] > Using GNU Bash, version 3.00.16(11)-release (i686-pc-cygwin) > on Windows XP > > I have a group...

Inserting Text into a file
Hi, I need help inserting text into a file. Here's what I have so far #!/bin/bash if [ $# -ne 1 ]; then echo "Usage:$0 insert " exit fi JMS_INSERTFILE=$1 cat jms.bak | nawk -v filename=$JMS_INSERTFILE ' BEGIN{if (filename=="") { print "Error:no filename given"; exit 1; } } !/\<\/queue\>/ {print} /\/\>/ {while( getline<filename) print;} ' > jms.xml but this inserts after the first "/>" where as I need it to insert after the last "/>". Or I need to insert before the last "...

inserting texts in a file
hi, i have this file: var1=one var2=two var4=four var5=five var7=seven var8=eigth i need to insert string to the file so that it will look like this: var1=one var2=two var3=three var4=four var5=five var6=six var7=seven var8=eigth can somebody teach me how to insert 'var3=three' and 'var6=six'? please note that the empty line should always be there. any inputs are very much appreciated. nick_faye ivpfmc28@yahoo.com (nick_faye) wrote in message news:<8a5e9892.0407240002.3fa0d713@posting.google.com>... > hi, > i have this file: > > var1...

Insert into text field?
How do I enter weapondescription with a space before it at the end of line 3. I tried this, but it is not working: self.text.insert(3.0, END, " ", weapondescription) Anyone? Thanks. -- Posted via http://dbforums.com On Sat, 20 Sep 2003 12:11:23 -0400 Baltor <member37516@dbforums.com> wrote: > > How do I enter weapondescription with a space before it at the end of > line 3. I tried this, but it is not working: > > self.text.insert(3.0, END, " ", weapondescription) If you're trying to pass a string that has the value ' weapondescrip...

Web resources about - Insert text file in a text field #3 - 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: 3/20/2016 2:19:05 AM