RE: Join & update help

2007-04-11 Thread Jerry Schwartz
> -Original Message- > From: Ravi Kumar. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 11, 2007 7:23 AM > To: mysql@lists.mysql.com > Subject: Join & update help > > Dear All, > > I have two tables T1 and T2. > > T1 has these columns: userid, passwo

Join & update help

2007-04-11 Thread Ravi Kumar.
Dear All, I have two tables T1 and T2. T1 has these columns: userid, password (userid is primary key) T2 has these columns: sessionid, userid, logintime, logofftime (sessionid is primary key) I wish to add one column in T1 called last_login_time. I want to populate this new column with max(

Re: insert...on duplicate key update...help

2006-01-26 Thread Gleb Paharenko
Hello. Perhaps you have forgotten to add col_name=expr to the end of your query. See: http://dev.mysql.com/doc/refman/5.0/en/insert.html Jonathan Mangin wrote: > I'm trying to change a couple of replace statements to > insert...on duplicate key update (using Perl/DBI). > > foreach my $key (k

insert...on duplicate key update...help

2006-01-26 Thread Jonathan Mangin
I'm trying to change a couple of replace statements to insert...on duplicate key update (using Perl/DBI). foreach my $key (keys %e_items) { my $sql = "insert table1 (id, date, time, uid, type, seq, value) values (?, ?, ?, ?, ?, ?, ?) on du

RE: JOIN QUERY -> UPDATE ... help?!

2005-08-10 Thread Brendan Gogarty
Brendan Gogarty wrote: > We are running mysql 3.23.58 and I want to do a query with joins > from two tables and then insert the results into the column of a third. [snip] Shawn Green wrote: > Start from here: > http://dev.mysql.com/doc/mysql/en/update.html > > Updates *are* allowed to use J

RE: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Gordon Bruce
Multi Table UPDATES are first supported in 4.0.x -Original Message- From: Brendan Gogarty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 09, 2005 12:16 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: RE: JOIN QUERY -> UPDATE ... help?! "Brendan Gogarty" <

Re: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Michael Stassen
Brendan Gogarty wrote: > We are running mysql 3.23.58 and I want to do a query with joins > from two tables and then insert the results into the column of a third. Shawn Green wrote: Start from here: http://dev.mysql.com/doc/mysql/en/update.html Updates *are* allowed to use JOINED tables a

RE: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Brendan Gogarty
"Brendan Gogarty" <[EMAIL PROTECTED]> wrote on 08/09/2005 05:30:51 AM: > Hi, > We are running mysql 3.23.58 and I want to do a query with joins > from two tables and then insert the > results into the column of a third. This appears to be harder than I > realised with this version of mysql a

Re: JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread SGreen
"Brendan Gogarty" <[EMAIL PROTECTED]> wrote on 08/09/2005 05:30:51 AM: > Hi, > We are running mysql 3.23.58 and I want to do a query with joins > from two tables and then insert the > results into the column of a third. This appears to be harder than I > realised with this version of mysql a

JOIN QUERY -> UPDATE ... help?!

2005-08-09 Thread Brendan Gogarty
Hi, We are running mysql 3.23.58 and I want to do a query with joins from two tables and then insert the results into the column of a third. This appears to be harder than I realised with this version of mysql and I am banging my head against a wall. Please Help! ok first query. --

Re: Table Update Help / Problem

2003-01-20 Thread Diana Soares
Check the REPLACE command... http://www.mysql.com/doc/en/REPLACE.html I think it suits your problem... On Mon, 2003-01-20 at 08:14, Michael Watson wrote: > This may be very simple, but the solution eludes me.. > > I have two tables Products and NewProducts, The Products table contains a > list

Table Update Help / Problem

2003-01-20 Thread Michael Watson
This may be very simple, but the solution eludes me.. I have two tables Products and NewProducts, The Products table contains a list of all the current product line and prices Products.ProdCode, Products.Price (amongst other details not relevent here). NewProducts contains a list of changes to

RE: Update help

2002-11-14 Thread Jennifer Goodie
You might want to try actually running the query. mysql_query ($query); or mysql_query ($query,$db); depending on your preference. -Original Message- From: Beauford [mailto:beauford.2003@;rogers.com] Sent: Thursday, November 14, 2002 1:53 PM To: [EMAIL PROTECTED] Subject: Update help Hi

Update help

2002-11-14 Thread Beauford
Hi, I'm trying to update a table from my webpage but not having much luck, although it works from the command line. Obviously I am missing something and would appreciate any help. Also. Is there a good tutorial or help page for Mysql. I find the one at www.mysql.com not very helpful. TIA The co

re: UPDATE help

2002-09-25 Thread Egor Egorov
Steven, Tuesday, September 24, 2002, 7:03:15 PM, you wrote: SK> I am currently working on a table that has a column called state and a SK> column called stateid. All 42,000 records in this table have a 2 Letter SK> abbreviation for that state (NY, CA, NV, etc) however. To eliminate SK> redunda

UPDATE help

2002-09-24 Thread Steven Kreuzer
Greetings, I am currently working on a table that has a column called state and a column called stateid. All 42,000 records in this table have a 2 Letter abbreviation for that state (NY, CA, NV, etc) however. To eliminate redundancy, I have move the states to another table that contains an AU

RE: verification upon update, help, please

2002-07-03 Thread Nilesh Shah
What happens if you put third TIMESTAMP column.?. Will that be updated?. Just curios. Nilesh -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 12:42 PM To: Paul Tomsic; [EMAIL PROTECTED] Subject: Re: verification upon update, help, please

Re: verification upon update, help, please

2002-07-03 Thread Paul DuBois
At 12:07 -0400 7/3/02, Paul Tomsic wrote: >Does MySQL prevent updates from occurring when the values involved >are the same as the database's current state. I don't know if "prevent" is the word exactly. It doesn't bother to update the row unless you actually change a value. The phenonenon you

verification upon update, help, please

2002-07-03 Thread Paul Tomsic
Does MySQL prevent updates from occurring when the values involved are the same as the database's current state. For instance, if I've got a table create table updater( id int not null primary key auto_increment, is_active int not null default 1 }; insert into updater(is_active) values (1); in