Re: mysql_insertid problem

2002-07-12 Thread Mike(mickalo)Blezien
>>$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

Re: security and dbi

2001-12-11 Thread Mike(mickalo)Blezien
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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Re: Creating a new database using DBI?

2001-12-04 Thread Mike(mickalo)Blezien
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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Exporting format

2001-11-19 Thread Mike(mickalo)Blezien
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

Re: MySQL and Foreign keys

2001-10-30 Thread mickalo
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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Re: escaping SQL statements properly DBD::mysql

2001-10-25 Thread mickalo
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.

Re: how to list all the field name?

2001-10-17 Thread mickalo
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 =-=-=-=-=-=-=-=-

Re: how to list all the field name?

2001-10-17 Thread mickalo
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 =-=-=-=-=-=-=-=-

Re: Postgres w/DBI

2001-10-14 Thread mickalo
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

Postgres w/DBI

2001-10-14 Thread mickalo
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

Re: Avoid Error if no results

2001-09-22 Thread mickalo
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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Avoid Error if no results

2001-09-22 Thread mickalo
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

Re: fetchrow_hashref question

2001-09-11 Thread mickalo
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 =-=-=-=-=-=-=

Re: Looping multiple selects

2001-08-27 Thread mickalo
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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Looping multiple selects

2001-08-25 Thread mickalo
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 =-=-=-=-=-=-=

Re: FW: auto commit

2001-08-14 Thread mickalo
}; >> 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Re: auto commit

2001-08-14 Thread mickalo
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

auto commit

2001-08-14 Thread mickalo
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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Re: Strange Error Can't find DBI

2001-08-08 Thread mickalo
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

Re: Strange Error Can't find DBI

2001-08-08 Thread mickalo
>>> 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/ >>

Re: Strange Error Can't find DBI

2001-08-08 Thread mickalo
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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Strange Error Can't find DBI

2001-08-08 Thread mickalo
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

Re: Exporting Data

2001-08-07 Thread mickalo
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

Exporting Data

2001-08-07 Thread mickalo
'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