Re: ON DUPLICATE KEY UPDATE and AUTO_INCREMENT columns

2005-05-19 Thread Sven Paulus
On 19.05., [EMAIL PROTECTED] wrote: > If you add another command, > mysql> insert into bla1 values (NULL, "Cello3", NULL) on duplicate key update > whentime = NOW(); > The right ID will be used. Yes, if I insert an new value then the ID column gets incremented. But if I try to insert an existing v

ON DUPLICATE KEY UPDATE and AUTO_INCREMENT columns

2005-05-19 Thread Sven Paulus
Hi, I'd like to insert string values into a table. If I add a new string, I want to get back the value of the AUTO_INCREMENT column. If the string already exists in the table, I'd like to get the AUTO_INCREMENT value of the existing entry. I thought this might be possible using INSERT ... ON DUPL

Cant conect...

2001-03-02 Thread Paulus
1) I've installed mysql from rpm. When i try to connect with database using: mysql database_name -uusername -ppassword from a root account it works. When i log in as other user and i type mysql database_name i got the message : Cant connect to local mysql server using socket. User 'us