>>$dbh->do(qq(insert into testac values ("","test")));
>>print "id=".$dbh->{'mysql_insertid'}."\n";
>>
>>
>>This script inserts a record and prints the id from the auto_increment
>>field. On the ONE box
lp, but you may want to check out:
http://www.mysql.com/doc/S/e/Secure_connections.html
for connecting to MySQL securely.
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
e name to use in the connect string, so
>>would I be able to connect?
>>
>>If this is possible, anyone have any examples?
>>
>>Thanks,
>>Mark
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Hello,
Sorry about the OT, but I need to export data from various MySQL tables and
import into Excell spread sheets. Was hoping someone could suggest the best
format, TAB, CSV..etc delimited, which is the preferred format?
thanks,
Mike(mickalo)Blezien
e
>>relationships?
>>How did you handle parent-child relationships -- when parents are
>>deleted
>>all their children must also be deleted. . .I would really to learn what
>>types of experiences have had.
>>
>>Thanks in advance,
>>Ward
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
NTIFIED BY " . $password;
>>
>>
>>$sth = $dbh->prepare($grant_db);
>>$sth->execute;
>>
>>the error I get is near the $username variable
>>
>>I guess what I am looking for is a better way to either
>>1. escape this statement
>>2.
How would one do this with the fetchrow_hashref ??
thx's
>>On Wed, 17 Oct 2001 13:52:08 -0600, "Sterin, Ilya" <[EMAIL PROTECTED]> wrote:
>>You can use fetchrow_hashref and then print the hash keys.
>>
>>Ilya
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-
How would one do this with the fetchrow_hashref ??
thx's
>>On Wed, 17 Oct 2001 13:52:08 -0600, "Sterin, Ilya" <[EMAIL PROTECTED]> wrote:
>>You can use fetchrow_hashref and then print the hash keys.
>>
>>Ilya
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-
ly a good
>>idea.
Thanks,..appreciate all the responses on the this subject. Now it's a matter of
learning Postgresql after working with MySQL for the past 2+ years :) the docs
on Postgresql site is a bit vague. Mainly installing and settup the db's and
user p
Hello All,
We've been using MySQL with Perl/DBI for quiet awhile, and have been looking at
trying Postgres. I was wonder how much re-coding is involved if we use our
existing scripts with Postgres instead of MySQL??
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder
gt;$sqlquery = qq|SELECT COUNT(m.memid) FROM members m,payhistory p
>> WHERE p.active = 'Y' AND p.memid = m.memid|;
>>$active = $dbh->selectrow_array($sqlquery) or dbError();
>>
>>$sqlquery = qq|SELECT COUNT(*) FROM expired WHERE expdate < CURDATE()|;
>>$expire = $dbh->selectrow_array($sqlquery) or dbError();
>>
>>Is this way to avoid the dbError() if the query returns no results(which
>>would
>>indicate a '0' tally.
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
URDATE()|;
$expire = $dbh->selectrow_array($sqlquery) or dbError();
Is this way to avoid the dbError() if the query returns no results(which would
indicate a '0' tally.
thx's
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Inte
BI.pm
>>--- DBI.origTue Sep 11 15:45:19 2001
>>+++ DBI.pm Tue Sep 11 16:51:13 2001
>>@@ -34,8 +34,9 @@
>> $ary_ref = $dbh->selectcol_arrayref($statement);
>> $ary_ref = $dbh->selectcol_arrayref($statement, \%attr);
Mike(mickalo)Blezien
=-=-=-=-=-=-=
rror("The Tag Number entered: $tagid is already in our
>>database","Duplicate Tag Number");
>> }
>>
>>}
>>
>>the @tagnums array stores the multiple tagid numbers and I need to loop thru
>>each one to make sure it's not already in the tags table. Is this the best
>>may
>>to approach this??
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ur
database","Duplicate Tag Number");
}
}
the @tagnums array stores the multiple tagid numbers and I need to loop thru
each one to make sure it's not already in the tags table. Is this the best may
to approach this??
THX's
Mike(mickalo)Blezien
=-=-=-=-=-=-=
};
>> if ($@) {
>> $dbh->rollback;
>> # other error handling: unlock the table, log a warning, etc.
>> }
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
he Autocommit => 0 is being
>>ignored in
>>our script. If it's set to '0' is still seems to process the queries with or
>>without invoking the $dbh->{'commit'} and no error is generated?
>>
>>I'm I missin
bh->{'commit'} and no error is generated?
I'm I missing something. ??
THX's
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
unt I'm using to do command
>>line debugging.
>>`su - ` and run a perl -V to see if it is the same perl that is
>>running for both accounts. If so, then do something like:
>>
>>perl -e 'print $ENV{PERL5LIB}, "\n"'
>>and/or
>>perl -e
>>> What would cause the script to fail at the command line and work
>>> perfectly thru the browser. The DBI module is installed!
>>
>>
>>-- Brett
>> http://www.chapelperilous.net/btfwk/
>>
ot found, if I execute the script from the browser, it works
perfectly!!
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
ll command line, I keep getting the error, DBI.pm module can not be located!!
What would cause the script to fail at the command line and work perfectly thru
the browser. The DBI module is installed!
Thx's
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publi
then
>>>put into a text
>>>file and have it tab delimited for each column value:
>>>
>>>$query = qq|select * from orders|;
>>>$sth = $dbh->prepare($query);
>>>$sth->execute();
>>>
>>>open(FILE,">$export_f
't get the tab delimited between each
column value properly and have a "\n" newline at the end of each @rows
Sorry for the basic question, but something is eluding me on this??
THX's
Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
P
24 matches
Mail list logo