Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: mysql insert/update

by liz (Monsignor)
on May 31, 2004 at 10:05 UTC ( #357762=note: print w/ replies, xml ) Need Help??


in reply to mysql insert/update

See REPLACE.

Liz


Comment on Re: mysql insert/update
Replies are listed 'Best First'.
Re: Re: mysql insert/update
by rsiedl (Friar) on May 31, 2004 at 10:57 UTC
    Thanks Liz,
    Not 100% what I was after but has put me onto "ON DUPLICATE KEY UPDATE".
    Now I just need to decide if I should update my MySQL :)
    Cheers,
    Reagen

    Update: My reasons for not using REPLACE is from my understanding it will delete the row and re-insert it with any column that I dont specify a value for, becoming the default value. I am after something where I am able to just update one column value keeping the others in there also.

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://357762]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (12)
    As of 2015-07-31 07:29 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (275 votes), past polls