Re: DBI->connect Error

2008-05-15 Thread Colin Wetherbee
Matt Skubiszewski wrote: my $dsn = "DBI:Pg:dbname=$dbname"; I haven't tested this, but the capitalized DBI sticks out to me. Try replacing that string with "dbi:Pg:dbname=$dbname". Colin

Re: Recursive SQL query?

2008-04-15 Thread Colin Wetherbee
Scott Webster Wood wrote: You shouldn't really need to go recursing through a data tree to come up with all the parts of a single fact. Well that is unless you are wanting to inherit data from linked elements further up a link list without re-posting redundant information. That's true enough

Re: Recursive SQL query?

2008-04-15 Thread Colin Wetherbee
Scott Webster Wood wrote: let'sjust say I left Property1 blank on the link forWindows and also in it's parent Desktop but had it filled in on theDesktop parent Computers (as shown above). If I wanted to find the Property1 for the sub category but found it blank, I'd like to grab thevalue from th

Re: Using q() to define a query

2008-01-12 Thread Colin Wetherbee
Dr.Ruud wrote: Colin Wetherbee schreef: (As an aside, how do you guys quote your queries? I find that for anything longer than about 60 characters, q() and '' and everything else start to look horribly inelegant.) my $sql = <<'SQL'; SELECT jo.departure_date

Re: Using q() to define a query

2008-01-11 Thread Colin Wetherbee
Jonathan Leffler wrote: On Jan 10, 2008 7:59 PM, Colin Wetherbee <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: [Fri Jan 11 03:49:09 2008] [debug] Log.pm(36): [client 192.168.171.80 <http://192.168.171.80>] [JetSet] SELECT departure_date, eq.name &

Re: Using q() to define a query

2008-01-11 Thread Colin Wetherbee
Tim Bunce wrote: On Fri, Jan 11, 2008 at 12:14:03PM +, Victor Churchill wrote: On 11/01/2008, Colin Wetherbee <[EMAIL PROTECTED]> wrote: (As an aside, how do you guys quote your queries? I find that for anything longer than about 60 characters, q() and '' and everythi

Using q() to define a query

2008-01-10 Thread Colin Wetherbee
Greetings. I have a DBI (DBD::Pg) application I'm building in mod_perl. My queries tend to look something like the following. my $sql = q(SELECT departure_date, eq.name AS equipment, dp.full_city AS departure_city, ap.full_city AS arrival_city, ca.name AS carrier_name, number FR

Re: Possible DBI logos

2004-06-03 Thread Colin Wetherbee
Jeff Zucker said: > In honor of Tim Bunce's 40th birthday, here are some samples of possible > DBI logos: Happy birthday, Tim. Surely, we all hope the next 40 are just as productive as the last. :) Colin -- Colin W. Wetherbee http://hydrogen.denterprises.org/

[Fwd: Re: Please help: DBI Question]

2003-11-23 Thread Colin Wetherbee
Original Message Subject: Re: Please help: DBI Question From:"kbass" <[EMAIL PROTECTED]> Date:Sun, November 23, 2003 1:32 To: "Colin Wetherb

Re: Please help: DBI Question

2003-11-20 Thread Colin Wetherbee
kbass said: > I am receiving a variable from HTML called 'STerr' and reading it into my > CGI program. The variable is accepted into the program and filters down > into a SQL statement. My problem is that I get no results from within my > CGI program but when I place this same SQL statement within

Re: How do I get the row id of the last insert?

2003-11-12 Thread Colin Wetherbee
Dan Anderson said: > If I insert a row into mySQL with an indexed auto incrementing column, > id, how do I get the id of the last inserted row? Use the LAST_INSERT_ID() function. Or, see these pages: http://www.mysql.com/doc/en/Getting_unique_ID.html http://www.mysql.com/doc/en/mysql_insert_id.ht

Re: nmaking dbd-mysql errors

2003-11-10 Thread Colin Wetherbee
Chuck Fox said: > Looks like you are missing the c compiler that your make file is > requesting/requiring. > >>'cl' is not recognized as an internal or external command, >>operable program or batch file. Yes, cl.exe is the C/C++ compiler that comes with Visual Studio. Colin -- Colin W. Wetherbe

Re: Beginner's insert problem results in unknown column value

2003-10-05 Thread Colin Wetherbee
jmulkerin said: > I used the placeholders and it works. > Thanks. > I still don't undertand why it didn't work the fisrt time. If you use placeholders, execute() properly quotes the values you pass to it. i.e., A2393 becomes 'A2393' or whatever is appropriate for your flavor of SQL. Colin --

Re: Mysql database migration.

2003-10-03 Thread Colin Wetherbee
Ron Savage said: > On Fri,  3 Oct 2003 13:44:53 +0300, [EMAIL PROTECTED] wrote: >> I want to create a migration tool, so i want to connect to my >> database (mysql) and choose the database i want to move. >> Afterwards, i would like to store ( the file/files i guess ) into >> my disk and be able to

Re: (OT) DBI udefined subroutine in perlcc

2003-09-28 Thread Colin Wetherbee
jmulkerin said: > Yeah but it protects passwords much better than no compiling. There are much better ways to use password authentication than by hardcoding passwords into your scripts/programs, however. For example, a credentials file with proper permissions. Or a private database that stores c

Fwd: Re: DBI udefined subroutine in perlcc

2003-09-28 Thread Colin Wetherbee
Original Message Subject: Re: DBI udefined subroutine in perlcc From:"jmulkerin" <[EMAIL PROTECTED]> Date:Sun, September 28, 2003 11:06 To: "Colin Wetherb

Re: DBI udefined subroutine in perlcc

2003-09-28 Thread Colin Wetherbee
Dan Anderson said: > I think remember perlcc is experimental. It doesn't always work 100% of > the time. perlcc is *very* experimental and should only be used if you're just playing around. Colin -- Colin W. Wetherbee http://hydrogen.denterprises.org/

Re: Is DBD another DBI?

2003-09-27 Thread Colin Wetherbee
[EMAIL PROTECTED] said: > thanks for the info. So for me, an app developer, I am concern about the > DBI which is the interface. In any case, I see that on redhat 9 there are > two drivers installed: mysql and pgsql. I assume there are drivers for > Oracle. I hope good ones! Yes, there's a very go

Re: Is DBD another DBI?

2003-09-27 Thread Colin Wetherbee
Jeff Zucker said: > Three DBDs for the open source kings under the sky, > Seven for the japh-lords in their halls of stone, > Nine for mortal hackers doomed to die, > One for the Dark Lord on his Redmond throne. > One DBI to rule them all, One DBI to find them, > One DBI to bring them all and in th

Re: Does DBI connection disconnect automatically

2003-09-26 Thread Colin Wetherbee
[EMAIL PROTECTED] said: > Sorry for the lack of info to my question. I have the connection working > fine. I wanted to know what happened to the connection when I don't > literally issue a $dbh->disconnect(). Does the connection closes > automaitcally or the pointer is still out there wasting away

Re: Any sample DBI connection caching

2003-09-26 Thread Colin Wetherbee
[EMAIL PROTECTED] said: > Can anyone show me a sample of connection caching for "use DBI;" within > cgi/mod_perl? Currently, I am using "use DBI;" not Apache::DBI because I > can't get Apache::DBI to work. I'm not entirely sure what you mean by "connection caching", but I think I might have an ans

Re: Memory leak?: execute() with bind values

2003-09-18 Thread Colin Wetherbee
Thomas L. Shinnick said: > I believe that the single prepare() with placeholders and multiple > execute()s with bind values has a memory leak. Program memory size > grows in proportion to number of INSERT's and average data size. > Memory is not released until program termination. This has been >

INSERT/UPDATE cursor (was: Re: Theory/Algorithm question)

2003-09-04 Thread Colin Wetherbee
Hardy Merrill said: > Kristian Nielsen [EMAIL PROTECTED] wrote: >> Could you briefly explain what an INSERT/UPDATE cursor is? > > I also don't know what an INSERT/UPDATE cursor is. I know how a SELECT cursor works, but INSERT/UPDATE seems voodoo to me. My current PostgreSQL session doesn't seem t

Re: help required DBI

2003-09-04 Thread Colin Wetherbee
Freddy Söderlund said: >> The DBI module is looking for something, and it can't find _that_. >> You'll see the DBI module was located just fine, since the error occurs >> on its line 255. > > Good point! > There I learned something as well. Thanx! I actually thought the same thing you did, when I

Re: help required DBI

2003-09-04 Thread Colin Wetherbee
Freddy Söderlund said: > First off, it seems that your script isn't printing the standard header > that is needed. This is indicated by the "Premature end of script > headers:"-line. That's likely due to the script bailing out before it gets a chance to print the headers, rather than the absence o