|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Good day
Please help! I need replase and insert date with one SQL command.. I create table: CREATE TABLE days ( user VARCHAR(8) NOT NULL, date DATE NOT NULL, count BIGINT UNSIGNED NOT NULL DEFAULT 0, INDEX (user), UNIQUE INDEX (date)); and I don't know how to change count field if date and user field not changed, but by(with) 1 equel command on insert and on replace... command "replace days set count=count+1, user="test", date="2000-03-09";" add new record, but not change count field if run more times. I try "replace days set count=(select 1+count from days where user="test" and date="2000-03-09");" -- not work. No ideas URL Please HELP! p.s. sorry for bad english ------------------ -- WBR, /sancho |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > help! insert and replace via replace |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|