RE: INSERT ... ON DUPLICATE KEY UPDATE seems so close and yet so far...

2007-04-30 Thread Daevid Vincent
> -Original Message- > From: Philip Hallstrom [mailto:[EMAIL PROTECTED] > > Because if you wanted that you'd use REPLACE which is mysql > specific which is okay since it's mysql you're using I guess. Except for the CRITICAL issue that REPLACE will DELETE the row first, thereby causing al

Re: INSERT ... ON DUPLICATE KEY UPDATE seems so close and yet so far...

2007-04-27 Thread Philip Hallstrom
Maybe this is some SQL standard implementation and that's why it is what it is, but to me it seems completely retarded that you have to explicitly call out the columns... http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html Why doesn't it work in a more convenient and sane way?! So i

INSERT ... ON DUPLICATE KEY UPDATE seems so close and yet so far...

2007-04-27 Thread Daevid Vincent
Maybe this is some SQL standard implementation and that's why it is what it is, but to me it seems completely retarded that you have to explicitly call out the columns... http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html Why doesn't it work in a more convenient and sane way?! So i

Result codes for insert...on duplicate key update

2006-09-28 Thread Jonathan Mangin
Hi, I'm using DBI and a dsn with 'mysql_client_found_rows=0' appended. A normal update returns 0E0 if no data has changed. The update part of insert...on duplicate key update always returns 2, whether data has changed or otherwise, plus the timestamp column is not automatical

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). > >

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 (?, ?, ?, ?, ?, ?, ?)

Re: INSERT ON DUPLICATE KEY UPDATE

2005-03-12 Thread Jocelyn Fournier
Hi, It could perhaps be related to bug #8147. http://bugs.mysql.com/bug.php?id=8147 Regards, Jocelyn Aleksandr Guidrevitch a écrit : Hi all ! I'm having problem with INSERT ... ON DUPLICATE KEY UPDATE on mysql 4.1.10 --8<--8<--8<--8<--8<--8<--8<-

INSERT ON DUPLICATE KEY UPDATE

2005-03-12 Thread Aleksandr Guidrevitch
Hi all ! I'm having problem with INSERT ... ON DUPLICATE KEY UPDATE on mysql 4.1.10 --8<--8<--8<--8<--8<--8<--8<--8<--8< INSERT INTO lot_end (id, owner_id, category_id, title, current_price, buy_price, end_time, price, bid_cou

Re: Error in Insert on Duplicate Key Update

2005-01-14 Thread Richard Whitney
Quoting sam wun <[EMAIL PROTECTED]>: > HI, > > the following insert/update produced error. I m using MySQL 5.0. > $insert_sql = qq {insert into inventory > (prodcode,qty,lastupdatedate,prodname,basename,vendorname,cost) > values (?,?,?,?,?,?,?) ON DUPLICATE KEY > U

Error in Insert on Duplicate Key Update

2005-01-13 Thread sam wun
HI, the following insert/update produced error. I m using MySQL 5.0. $insert_sql = qq {insert into inventory (prodcode,qty,lastupdatedate,prodname,basename,vendorname,cost) values (?,?,?,?,?,?,?) ON DUPLICATE KEY UPDATE qty=$q

Re: INSERT .. ON DUPLICATE KEY UPDATE behaviour

2004-10-16 Thread Sergei Golubchik
Hi! On Oct 15, Jason McManus wrote: > Good afternoon, > > I have had reason to use the new (as of 4.1.1) INSERT .. ON DUPLICATE KEY > UPDATE syntax in MySQL. However, I am a bit confused as to the return > value. Issuing the INSERT .. ON DUP KEY UP statement, upon finding a >

INSERT .. ON DUPLICATE KEY UPDATE behaviour

2004-10-15 Thread Jason McManus
Good afternoon, I have had reason to use the new (as of 4.1.1) INSERT .. ON DUPLICATE KEY UPDATE syntax in MySQL. However, I am a bit confused as to the return value. Issuing the INSERT .. ON DUP KEY UP statement, upon finding a duplicate key and updating that record, mysql-client returns &q

Re: Insert...on duplicate key update

2003-07-07 Thread Jocelyn Fournier
Hi, ON DUPLICATE KEY UPDATE is only available with MySQL 4.1.x. Regards, Jocelyn - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 08, 2003 8:32 AM Subject: Insert...on duplicate key update > >Description: > I have b

Insert...on duplicate key update

2003-07-07 Thread zoe . scaife
>Description: I have been writing an update program in perl, and sought to make use of the insert...update construct described in the insert syntax section of the manual supplied with the download of mysql-4.0.13-standard. However, upon using the construct in my code, I receive syn