On Thu, Sep 26, 2002 at 11:30:28PM +0200, Bart Lateur wrote:
> On Thu, 26 Sep 2002 21:46:16 +0100, Tim Bunce wrote:
>
> >If that may happen then it's safer to try the insert first and if that
> >fails due to a duplicate key then do the update.
>
> At least MS Access has the problem that an autoi
Hardy Merrill wrote:
>
> Be careful about using the "rows" method - here's a section
> from 'perldoc DBI':
>
>"rows"
> $rv = $sthâ??>rows;
>
>Returns the number of rows affected by the last row affecting comâ??
>mand, or â^?1 if the number of rows is
On Thu, 26 Sep 2002 21:46:16 +0100, Tim Bunce wrote:
>If that may happen then it's safer to try the insert first and if that
>fails due to a duplicate key then do the update.
At least MS Access has the problem that an autoincrement field (or
whatever it is called in Access) IS incremented even i
On Thu, Sep 26, 2002 at 02:10:00PM -0600, Tkil wrote:
> > "Chad" == chad kellerman <[EMAIL PROTECTED]> writes:
>
> Chad> I want to check to see if the hosts exists. IF it does update
> Chad> if not insert.
>
> Note that some databases have this functionality built-in; MySQL has a
> REPLACE
Be careful about using the "rows" method - here's a section
from 'perldoc DBI':
"rows"
$rv = $sth‐>rows;
Returns the number of rows affected by the last row affecting com‐
mand, or −1 if the number of rows is not known or not available.
Gener
> "Chad" == chad kellerman <[EMAIL PROTECTED]> writes:
Chad> I want to check to see if the hosts exists. IF it does update
Chad> if not insert.
Note that some databases have this functionality built-in; MySQL has a
REPLACE primitive that does exactly this.
In other databases, I typically t
chad kellerman wrote:
>
> Hello everyone,
>
>I was wondering, what would be the easiest way to check for the
> results of a select statement?
>
>For example, if I connect and say select host from host where
> host="domain.com";
>
>I want to check to see if the hosts exists.
>
>
Hello everyone,
I was wondering, what would be the easiest way to check for the
results of a select statement?
For example, if I connect and say select host from host where
host="domain.com";
I want to check to see if the hosts exists.
IF it does update if not insert.
I have:
my $