Re: Working with DBI

2003-07-08 Thread Greenhalgh David
#!/usr/local/bin/perl -wT use strict; use CGI ':standard'; use DBI; use CGI::Carp qw(fatalsToBrowser); # Simulate a param call in CGI my $player="HarryPotter"; # Connect to the database my $dbh = DBI->connect("DBI:mysql:ladderDB", "", "xx"); # Make an update that is representative of t

RE: Working with DBI

2003-07-08 Thread Bob Showalter
Bob Showalter wrote: > ... Make sure you have RaiseError turned on. and PrintError -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Working with DBI

2003-07-08 Thread Bob Showalter
Greenhalgh David wrote: > On Tuesday, July 8, 2003, at 01:19 pm, Bob Showalter wrote: > > > Greenhalgh David wrote: > > > ... > > > In other words, my SELECT block is returning the value of available as > > > it was before the UPDATE, even though I have AutoCommit set to 1, the > > > UPDATE is ca

Re: Working with DBI

2003-07-08 Thread Greenhalgh David
On Tuesday, July 8, 2003, at 01:19 pm, Bob Showalter wrote: Greenhalgh David wrote: ... In other words, my SELECT block is returning the value of available as it was before the UPDATE, even though I have AutoCommit set to 1, the UPDATE is called before the SELECT and manual investigation of the t

RE: Working with DBI

2003-07-08 Thread Bob Showalter
Greenhalgh David wrote: > ... > In other words, my SELECT block is returning the value of available as > it was before the UPDATE, even though I have AutoCommit set to 1, the > UPDATE is called before the SELECT and manual investigation of the > table clearly shows that the UPDATE was successful. T

Fwd: Working with DBI

2003-07-07 Thread Greenhalgh David
Begin forwarded message: From: Greenhalgh David <[EMAIL PROTECTED]> Date: Mon Jul 7, 2003 5:17:33 pm Europe/London To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: Working with DBI On Monday, July 7, 2003, at 01:12 pm, Craig Dean wrote: On Sunday 06 July 2003 02:14 pm, Gree

Re: Working with DBI

2003-07-07 Thread Greenhalgh David
On Monday, July 7, 2003, at 01:12 pm, Craig Dean wrote: On Sunday 06 July 2003 02:14 pm, Greenhalgh David wrote: If you are assigning the value of the field "available" to a variable then you should kill or delete that variable (CGI::delete) before you are able to assign a new value to it. Craig

Re: Working with DBI

2003-07-06 Thread Greenhalgh David
If you are assigning the value of the field "available" to a variable then you should kill or delete that variable (CGI::delete) before you are able to assign a new value to it. Craig No, I'm not assigning the value of available to a previously used variable. For safety's sake, I am reading

Re: Working with DBI - extra info

2003-07-06 Thread Greenhalgh David
I should have mentioned that the connect call uses AutoCommit like this: my $dbh=DBI->connect(DBD:mysql:databasename, "username", "userpassword", {AutoCommit =>1}); Hi All, I have a script that updates a value in a table using $handle=$dbh->do(UPDATE league SET available=DATE_ADD(NOW() INTERV

Working with DBI

2003-07-06 Thread Greenhalgh David
Hi All, I have a script that updates a value in a table using $handle=$dbh->do(UPDATE league SET available=DATE_ADD(NOW() INTERVAL $offset DAY); The script then reads the value of "available" using a prepare/execute/fetchrow statement. The script then needs to e-mail the new value of the