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
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
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
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
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
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
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
Hello,
I have a question, how to insert binary data into the table by MySql DBI
module ?
Thanks
Michal Weinfurtner
You have to have 'blob' filed in your database?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [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 to do is to take
all of the keys (like system
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
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
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
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
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
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
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
-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
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
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
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
]
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
, 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
(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
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
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);
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
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,
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.
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
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
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
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
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
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
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
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
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
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
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
101 - 156 of 156 matches
Mail list logo