Re: create connection from html form into insert MySQL data script

2004-09-07 Thread Eduardo Vázquez Rodríguez
PROTECTED] Sent: Wednesday, September 08, 2004 1:06 AM To: 'Maxipoint Rep Office'; [EMAIL PROTECTED] Subject: RE: create connection from html form into insert MySQL data script Maxipoint Rep Office [EMAIL PROTECTED] wrote: : I am successful insert data in MySQL with code below: I am having trouble

Re: create connection from html form into insert MySQL data script

2004-09-07 Thread Gunnar Hjalmarsson
Maxipoint Rep Office wrote: I am successful insert data in MySQL with code below: Message from comp.lang.perl.misc forwarded FYI: Original Message Subject: Re: create connection from html form into insert MySQL data script Date: Wed, 08 Sep 2004 03:14:12 +0200 From: Gunnar

Class to select/insert/delete/update

2004-06-24 Thread Rod Za
Hello, i'm trying to make a class to do select/insert/delete/update on a MySQL table (via DBI). this is a snip of code: sub query{ my $self = shift; my($sql) = @_; my @result; my $sth = $self-{dbh}-prepare($sql) or return undef; if($sql =~ /delete|insert

Re: Class to select/insert/delete/update

2004-06-24 Thread Wiggins d Anconia
Hello, i'm trying to make a class to do select/insert/delete/update on a MySQL table (via DBI). this is a snip of code: You haven't really shown us a class, just a method... sub query{ my $self = shift; my($sql) = @_; my @result; Why scope @result here

Re: Class to select/insert/delete/update

2004-06-24 Thread LRMK
I think it will be nice if you write more hgher level methods for each InsertSelect, Update, Create, And Delete commends. Ex:- An Insert method which take the table name and a Hash as args and cunstruct the query and execute it sub Insert($%){ $self = shift; my ($table,%data

Can't INSERT INTO for one column

2004-06-15 Thread Chris Charley
Hi The error messages I'm getting from the attempted insert are: C:\perlpperl t.pl DBD::SQLite::db do failed: no such column: cash at t.pl line 17, DATA line 1. DBD::SQLite::db do failed: no such column: cash at t.pl line 17, DATA line 2. DBD::SQLite::db do failed: no such column: credit

RE: Can't INSERT INTO for one column

2004-06-15 Thread Bob Showalter
Chris Charley wrote: Hi The error messages I'm getting from the attempted insert are: C:\perlpperl t.pl DBD::SQLite::db do failed: no such column: cash at t.pl line 17, DATA line 1. DBD::SQLite::db do failed: no such column: cash at t.pl line 17, DATA line 2. DBD::SQLite::db do

Mysql and binary data insert

2003-10-22 Thread Michal Weinfurtner
Hello, I have a question, how to insert binary data into the table by MySql DBI module ? Thanks Michal Weinfurtner

Re: Mysql and binary data insert

2003-10-22 Thread Andrew Shitov
You have to have 'blob' filed in your database? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Search and Insert into Hash

2003-07-15 Thread Kevin Pfeiffer
In article [EMAIL PROTECTED], Jenda Krynicky wrote: From: [EMAIL PROTECTED] What I am trying to do is to take lines out of a file that are formatted like: SYSTEM=value1 DOMAIN=value2 etc. There are about 1000 lines like that and what I need to do is to take all of the keys (like system

Re: Search and Insert into Hash

2003-07-15 Thread Jenda Krynicky
From: Kevin Pfeiffer [EMAIL PROTECTED] In article [EMAIL PROTECTED], Jenda Krynicky wrote: From: [EMAIL PROTECTED] What I am trying to do is to take lines out of a file that are formatted like: SYSTEM=value1 DOMAIN=value2 etc. There are about 1000 lines like that and what I need

Search and Insert into Hash

2003-07-14 Thread bseel
What I am trying to do is to take lines out of a file that are formatted like: SYSTEM=value1 DOMAIN=value2 etc. There are about 1000 lines like that and what I need to do is to take all of the keys (like system and domain) and put them into a hash. But each of those keys has multiple values

Re: Search and Insert into Hash

2003-07-14 Thread Jenda Krynicky
From: [EMAIL PROTECTED] What I am trying to do is to take lines out of a file that are formatted like: SYSTEM=value1 DOMAIN=value2 etc. There are about 1000 lines like that and what I need to do is to take all of the keys (like system and domain) and put them into a hash. But each of

Help w/ script to insert text

2003-03-21 Thread William Voyek
Hi all, First of all I'm not a programmer and am completely new perl so please be gentle with me. My problem is that I'm trying to use the script below to insert some text into multiple files. The files are control files for qmail, the MTA we use. The text that I want to insert will call

RE: Help w/ script to insert text

2003-03-21 Thread Wagner, David --- Senior Programmer Analyst --- WGO
William Voyek wrote: Hi all, First of all I'm not a programmer and am completely new perl so please be gentle with me. My problem is that I'm trying to use the script below to insert some text into multiple files. The files are control files for qmail, the MTA we use. The text that I want

Re: Help w/ script to insert text

2003-03-21 Thread Rob Dixon
David --- Senior Programmer Analyst --- Wgo Wagner wrote: scanner. So, the text I need inserted is: /usr/local/bin/odeiavir -r [EMAIL PROTECTED] Try adding \ as [EMAIL PROTECTED] This escapes those characters otherwise it tries to expand $EXT and possibly @$HOST. With the escaping

RE: Help w/ script to insert text

2003-03-21 Thread William Voyek
Thanks. This worked perfectly. William -Original Message- From: Rob Dixon [mailto:[EMAIL PROTECTED] Sent: Friday, March 21, 2003 11:58 To: [EMAIL PROTECTED] Subject: Re: Help w/ script to insert text David --- Senior Programmer Analyst --- Wgo Wagner wrote: scanner. So, the text I

RE: Status of db insert?

2002-08-15 Thread Bob Showalter
-Original Message- From: Rob [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 15, 2002 10:08 AM To: [EMAIL PROTECTED] Subject: Status of db insert? Hi, I've recently started using PostgreSQL and am trying to load a table from a file. The file has 4275 records

Insert Var in Regex Problem

2002-07-10 Thread Connie Chan
Hi all, Say, I have an input $x = ABCDEF; and I will try to remove $x from a string, what can I do ? Is there something like : $x =~ s/$x//g; Rgds, Connie

Re: Insert Var in Regex Problem

2002-07-10 Thread Felix Geerinckx
on Wed, 10 Jul 2002 22:05:58 GMT, Connie Chan wrote: Say, I have an input $x = ABCDEF; and I will try to remove $x from a string, what can I do ? Is there something like : $x =~ s/$x//g; That's just a complicated way to say $x = ''; But this works: #! perl -w use

Re: Insert Var in Regex Problem

2002-07-10 Thread Connie Chan
anyway. =) Rgds, Connie -Original Message- From: Connie Chan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 3:06 PM To: [EMAIL PROTECTED] Subject: Insert Var in Regex Problem Hi all, Say, I have an input $x = ABCDEF; and I will try to remove $x from a string

Re: Insert Var in Regex Problem

2002-07-10 Thread George Schlossnagle
] Subject: Insert Var in Regex Problem Hi all, Say, I have an input $x = ABCDEF; and I will try to remove $x from a string, what can I do ? Is there something like : $x =~ s/$x//g; Rgds, Connie -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Insert Var in Regex Problem

2002-07-10 Thread Connie Chan
PROTECTED] Subject: Insert Var in Regex Problem Hi all, Say, I have an input $x = ABCDEF; and I will try to remove $x from a string, what can I do ? Is there something like : $x =~ s/$x//g; Rgds, Connie -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Insert Var in Regex Problem

2002-07-10 Thread John W. Krahn
Connie Chan wrote: From: Connie Chan [mailto:[EMAIL PROTECTED]] Say, I have an input $x = ABCDEF; and I will try to remove $x from a string, what can I do ? Is there something like : $x =~ s/$x//g; Sorry everybody I've make a mistake on forgetting to add a /i

Re: unable to insert data into two tables at same time

2002-06-16 Thread Joe Raube
successfully insert data into one table, but fail to insert data into another table. My sample as follows: *** my $dbh = DBI-connect('dbi:mysql:ordering','yxc', '9cvpt') ||die unable to connect: $DBI::errstr; my $sql = INSERT

unable to insert data into two tables at same time

2002-06-15 Thread Yuan Cheng
Hi, there: I try to write a perl code that takes form data from html page and inserts or updates database tables. I have successfully insert data into one table, but fail to insert data into another table. My sample as follows: *** my $dbh = DBI

Re: unable to insert data into two tables at same time

2002-06-15 Thread Shawn
What is the returned error from DBI? Also, turn warnings on (-w behind the shebang) and see what it says from the command line... You should be able to do as many inserts as you want with a single db handle. Also, on the second insert, are you trying to insert null values? I am curious

SQL: Insert column?

2002-05-20 Thread eric-perl
Hello, All: I'm using DBI.pm to interact with flat-file database and want to add a new column to the database. Is there an SQL statement for such a task or do I need to transfer the contents of the file to another file and insert the column during the transfer? -- Eric P. Los Gatos, CA

Re: SQL: Insert column?

2002-05-20 Thread bob ackerman
and insert the column during the transfer? -- Eric P. Los Gatos, CA most dbs let you add a column, but there is no standard - it depends on your database. check documentation for your db on 'ALTER' or 'ADD' command. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Large Insert statements

2002-05-16 Thread Kevin O
Hello all, I need to insert a lot of data into a mysql table. Know that I can do it like this example: my $sth = $dbh-prepare(q{ INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) }) or die $dbh-errstr; while () { chomp; my ($product_code, $qty, $price

Re: Large Insert statements

2002-05-16 Thread Frank Wiles
PROTECTED] Revolution Systems, LLC. - On Thu, 16 May 2002 15:55:29 -0500 Kevin O [EMAIL PROTECTED] wrote: Hello all, I need to insert a lot of data into a mysql table. Know that I can do it like this example: my $sth = $dbh-prepare(q

Re: Large Insert statements

2002-05-16 Thread Harry Jackson
From: Kevin O[SMTP:[EMAIL PROTECTED]] Hello all, I need to insert a lot of data into a mysql table. Know that I can do it like this example: my $sth = $dbh-prepare(q{ INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) }) or die $dbh-errstr; while

Re: Large Insert statements

2002-05-16 Thread bob ackerman
On Thursday, May 16, 2002, at 01:55 PM, Kevin O wrote: Hello all, I need to insert a lot of data into a mysql table. Know that I can do it like this example: my $sth = $dbh-prepare(q{ INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) }) or die $dbh-errstr; while

Re: Large Insert statements

2002-05-16 Thread Harry Jackson
From: Kevin O[SMTP:[EMAIL PROTECTED]] Hello all, I need to insert a lot of data into a mysql table. Know that I can do it like this example: my $sth = $dbh-prepare(q{ INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) }) or die $dbh-errstr; while

Re: Large Insert statements

2002-05-16 Thread Chas Owens
On Thu, 2002-05-16 at 16:55, Kevin O wrote: Hello all, I need to insert a lot of data into a mysql table. Know that I can do it like this example: my $sth = $dbh-prepare(q{ INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?) }) or die $dbh-errstr; while

Re: Large Insert statements

2002-05-16 Thread Michael Fowler
On Thu, May 16, 2002 at 03:55:29PM -0500, Kevin O wrote: My problem is, I have 500 fields. I know I can start the Insert statement like INSERT INTO mytable VALUES - cause I'm inserting a value for every field in the database, but do I have to type a ? for all 500 fields? BTW, I'm just

Re: insert in a browseentry

2002-04-16 Thread John W. Krahn
Jorge Goncalvez wrote: Hi, I have this: opendir(DIR,$_Globals{CDROM}:/DHS3MGR/$tel_version/DHS3Linux); foreach (readdir(DIR)){ unless (/([Comm]+)/){ $box3-insert('end', $_); } $box3 is a browse entry. It works fine but My problem is there is a file

Perl SQL help! Need to insert records into two tables

2002-03-12 Thread Brian Johnson
to dealing with multiple SQL statements in perl - usually just a select or an insert) INSERT INTO notes (fields) VALUES (new stuff); $variable = SELECT CURRVAL('name-of-sequence-for-notes_id') INSERT INTO palm_memos (notes_id, other fields) VALUES ($variable, other fields); Could someone post

Re: Perl SQL help! Need to insert records into two tables

2002-03-12 Thread Jenda Krynicky
, but I need to translate this to operate in perl (I'm not used to dealing with multiple SQL statements in perl - usually just a select or an insert) INSERT INTO notes (fields) VALUES (new stuff); $variable = SELECT CURRVAL('name-of-sequence-for-notes_id') INSERT INTO palm_memos (notes_id

Re: Perl SQL help! Need to insert records into two tables

2002-03-12 Thread M. Kirk DeBaets
(I'm not used to dealing with multiple SQL statements in perl - usually just a select or an insert) INSERT INTO notes (fields) VALUES (new stuff); $variable = SELECT CURRVAL('name-of-sequence-for-notes_id') INSERT INTO palm_memos (notes_id, other fields) VALUES ($variable, other fields); Could

How to insert a line in the middle of a file?

2002-03-04 Thread Kypa, J. (Jagan)
Hi, I am modifying an existing perl script to basically insert a statement as the 3rd sentence of a file(so the existing 3rd sentence of the file would become the 4th sentence). I've looked at some FAQs on the perldoc.com site and managed to get started. However, I am only able to insert

Re: How to insert a line in the middle of a file?

2002-03-04 Thread Eric Beaudoin
At 14:11 2002.03.04, Kypa, J. (Jagan) wrote: $old = $LeafPreName.acf; $new = $old..tmp; $bak = $old..orig; open(OLD, $old); open(NEW, $new); while () { if ($. == 3) { print NEW INTEGRATOR/ ERROR=5.0E-2, HINIT=2.5E-4,HMAX=2.5E-4, KMAX=6, MAXIT=10\n; } } close(OLD);

Re: How to insert a line in the middle of a file?

2002-03-04 Thread Kypa, J. (Jagan)
Eric, Thank you. Works like a charm. Thanks again. I have the loop as while (OLD) { if ($. == 3) { print NEW INTEGRATOR/ ERROR=5.0E-2, HINIT=2.5E-4,HMAX=2.5E-4, KMAX=6, MAXIT=10\n; } print NEW; } Regards, Jagan Eric Beaudoin wrote: At 14:11

html insert

2002-02-27 Thread cbsvensson
Is there any way I can have a script producing a bit of html code on a remote computer and then be able to make a call to that in a HTML document which then will similair to img src=http://something.com/xx.cgi?sdfsdfsdf; If it can be done let me know how thank you -- To unsubscribe,

Re: html insert

2002-02-27 Thread Jon Molin
svensson wrote: Is there any way I can have a script producing a bit of html code on a remote computer and then be able to make a call to that in a HTML document which then will similair to img src=http://something.com/xx.cgi?sdfsdfsdf; If it can be done let me know how yes it is.

Re: html insert

2002-02-27 Thread Jon Molin
cbsvensson wrote: but that is still an image I wonder if I can produce text including links any good cgi groups to suggest thank you sorry i didn't saw that you wanted html, what i did can be useful for counters and similar. well, lwp is a useful module for things like that. get the

Insert delimiter between number and alpha

2002-02-07 Thread Frank Newland
All, My input looks like this == 5544#1341343BORIS 6200#321BOWSER 89232652#6213VERONICA === I want to put a delimiter (#) between the rightmost number and the left most alpha Resulting in 5544#1341343#BORIS 6200#321#BOWSER 89232652#6213#VERONICA

RE: Insert delimiter between number and alpha

2002-02-07 Thread Nikola Janceski
s/(\d)([a-z])/$1#$2/i; that's not a very good way to store women's phone numbers. I like to us a little black book. -Original Message- From: Frank Newland [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:28 PM To: [EMAIL PROTECTED] Subject: Insert delimiter between number

Re: Insert delimiter between number and alpha

2002-02-07 Thread Frank
On Thu, Feb 07, 2002 at 11:27:53AM -0600, Frank wrote: All, My input looks like this == 5544#1341343BORIS 6200#321BOWSER 89232652#6213VERONICA === I want to put a delimiter (#) between the rightmost number and the left most alpha Resulting in

Re: Insert delimiter between number and alpha

2002-02-07 Thread Jeff 'japhy' Pinyan
On Feb 7, Frank Newland said: I want to put a delimiter (#) between the rightmost number and the left most alpha s/(\d)([^\W\d])/$1#$2/; You can't just say (\d)(\w), because \w INCLUDES \d. You could write something like (\d)(?!\d)(\w), which requires that the \w character after the \d NOT

Insert text in HTML page...

2001-12-17 Thread Jack Smith
Hello to all! Somebody could say to me as I can insert the content of a text file in a page HTML? What happens is that this file is updated frequently and desire to print its content in a page Web. Could be... print file.txt ;? Any advice well is received. Thanks

Re: Insert text in HTML page...

2001-12-17 Thread Agustin Rivera
You can create a template html file, then insert a phrase in the middle that is searched-and-replaced. Such as .. HTMLBODYINSERTTEXT/BODY/HTML Then the perl script would do.. $textfile=file.txt; open(IN, $textfile) or die $!; while(IN) {$text.=$_;} close(IN); ## then do the same for $htmlfile

Re: Insert text in HTML page...

2001-12-17 Thread William.Ampeh
I hope you do not forget pre before dumping the contents of the file. -- #!/opt/local/bin/perl $my_file = aa.txt; open(IN, $my_file) or die \n\ncannot open file\n\n; @aa = IN; print EOF; Content-type: text/html htmlbody bgcolor=white text=blue pre

regex and insert

2001-08-16 Thread Toni_T_Banire
Hi I'm trying to pipe a grep to an outfile. The grep function works ok @sc=grep /win|net/, @NIC However, I would like to insert a couple of lines before the file starts to log all occurrences containing net without using separate grep commands. All help appreciated Toni

How to Insert Array Elements Sequentially

2001-07-26 Thread Rashid Faraby
Hi Folks, I've been struggling with this for a couple of hours this morning and it seems like I'll need some help from the pros. I have a long file consisting of document numbers. I would like to insert sequentially a number into records saved in another file I am data munging through

Re: How to Insert Array Elements Sequentially

2001-07-26 Thread Abdulaziz Ghuloum
would like to insert sequentially a number into records saved in another file I am data munging through a while loop. The problem I am faced with is how to instruct the code to insert a single array element and remember where it left off. For instance, during the first run, it'll get

<    1   2