Re: Why can't use SQL "GROUP BY..."?

2003-01-09 Thread Philip Newton
On Thu, 9 Jan 2003 22:59:03 +0800 (CST), [EMAIL PROTECTED] (Gary fung) wrote: > My coding is similar as: > > $value2 = $dbh->prepare("SELECT page FROM $Table > > GROUP BY page") || die "Couldn't add record, ".$dbh->errstr(); > > Whenever I use "GROUP BY.." , an error statement will go out : >

Re: What is the return value for system calls?

2002-11-19 Thread Philip Newton
On Tue, 19 Nov 2002 13:05:38 -0500, [EMAIL PROTECTED] (Chris Faust) wrote: > How about (one of many ways): > > system ( $CommandString ) or die &process_error("$CommandString); Um, no. system() returns $?, so 0 on success and something else on failure. Either use "system(...) and die" or "syste

Re: fetching rows from mysql

2002-04-10 Thread Philip Newton
On Thu, 11 Apr 2002 01:58:16 +, [EMAIL PROTECTED] (Matthew Harrison) wrote: > I am writing a login script using cookie and DBI to connect to a mysql > database and I need to run a query like: > > "SELECT username from users" > > and have it return all the usernames in preferably an array s

Re: connection difference Oracle / MySQL

2002-02-16 Thread Philip Newton
On Thu, 14 Feb 2002 08:59:18 +0100, [EMAIL PROTECTED] (Koen Gogne) wrote: > the scripts die on a '$sth->prepare()' or '$sth->execute()' and > we can never predict on which one or why. Are you using PrintError or RaiseError, or checking $sth->errstr? > ($dbh->errstr doesn't help...) What does i

Re: FW: CPAN Upload: J/JU/JURL/DBD-ODBC-0.36.tar.gz

2002-02-16 Thread Philip Newton
On Sun, 10 Feb 2002 06:57:46 -0500, [EMAIL PROTECTED] (Jeff Urlwin) wrote: > Oops. I let an ODBC 3.x call slip in. That will break some builds. Jeff, could you add a "Changes" file in such a way that search.cpan.org will see it? When I look at search.cpan.org's info on DBD::ODBC I can't tell w

Re: retrieving exit value from SQL function in Perl

2001-11-21 Thread Philip Newton
On 20 Nov 2001 22:10:45 -, in perl.dbi.users you wrote: > Does anyone know how to get an exit value from the following? If I have: > > $insert_cr= $dbh->prepare("DECLARE result_cr VARCHAR2(30); > > BEGIN r

Re: Checking result of MS Access insert statement

2001-11-20 Thread Philip Newton
On Tue, 20 Nov 2001 17:39:58 -0500, in perl.dbi.users you wrote: > PS> One caveat, ya have to make sure you escape those @ signs. Like this... > > $sth = $dbh->prepare( "select \@\@identity"); Or like this: $sth = $dbh->prepare( 'select @@identity' ); Cheers, Philip

Re: How to execute a stored proc

2001-11-15 Thread Philip Newton
On Thu, 15 Nov 2001 11:02:32 -0800, [EMAIL PROTECTED] (Tim Harsch) wrote: > How do you execute an oracle stored procedure via DBI? Have a look in DBD::Oracle; there are a couple of examples there. I managed to get things working based on that. Cheers, Philip

Re: = NULL vs. IS NULL

2001-10-23 Thread Philip Newton
On Tue, 23 Oct 2001 23:56:39 +0200, [EMAIL PROTECTED] (Bart Lateur) wrote: > On Tue, 23 Oct 2001 12:35:57 -0500, Stephen Clouse wrote: > > >This is not Oracle, but ANSI-standard behavior. NULL represents the absence or > >non-existence of a value. A non-existent value cannot be equal to anyth

Re: undef & NULL

2001-09-12 Thread Philip Newton
On Wed, 12 Sep 2001 13:59:49 -0400 (EDT), [EMAIL PROTECTED] (Rob Ransbottom) wrote: > Has anyone tried caching the prepared statements? Yes; I do that frequently. That's really why there's a difference between preparing and executing; I usually prepare all the statements I will need at the beg

Re: undef & NULL

2001-09-11 Thread Philip Newton
On Wed, 12 Sep 2001 01:21:06 +0200, [EMAIL PROTECTED] (Bart Lateur) wrote: > What can you do? I *think* placeholders do the right thing I believe so, too. Use placeholders. Placeholders good. They save you from having to quote interior quotation marks, they handle NULLs correctly, they're bette

Re: Fetching Column Names

2001-05-08 Thread Philip Newton
s. Applications can use any valid table regardless of whether it's returned by tables. See also the table_info entry elsewhere in this document. Once you have the names of the tables, you can use the first method to get the names of the columns for each of the tables. For more info, RTFM. Cheers, Philip -- Philip Newton <[EMAIL PROTECTED]>

Re: Urgent Help Please

2001-05-07 Thread Philip Newton
On 7 May 2001, at 12:30, Ronald J Kimball wrote: > On Mon, May 07, 2001 at 06:22:01PM +0200, Philip Newton wrote: > > But you get warnings on $dbh->disconnect if you don't finish all your > > statement handles. At least that's why I always try to remember it. > &

Re: Urgent Help Please

2001-05-07 Thread Philip Newton
bh->disconnect if you don't finish all your statement handles. At least that's why I always try to remember it. Cheers, Philip -- Philip Newton <[EMAIL PROTECTED]>

Re: Removal from mailing list

2001-04-05 Thread Philip Newton
ce the at sign with an equals sign and append it with a hyphen to dbi-users-unsubscribe). > Thank you Your cooperation is appreciated. Cheers, Philip -- Philip Newton <[EMAIL PROTECTED]>

Re: Help...

2001-04-05 Thread Philip Newton
he list, it should suffice to mail [EMAIL PROTECTED] and it qmail/ezmlm should pick up the address from your headers. However, I just mailed the address you gave there and you might be getting a message to confirm the unsubscription :) Cheers, Philip -- Philip Newton <[EMAIL PROTECTED]>

Re: DBI connection

2001-04-04 Thread Philip Newton
Read the DBI and DBD::Oracle documentation (especially the latter) for the connect syntax. There are a multitude of ways to specify the connection string to DBD::Oracle. Cheers, Philip -- Philip Newton <[EMAIL PROTECTED]>