Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: OT: updating database question

by Conrad.Irwin (Novice)
on Jul 22, 2007 at 20:27 UTC ( #628141=note: print w/replies, xml ) Need Help??


in reply to OT: updating database question

With the effort you have gone to to normalise your data, I dont think that the laziness of rewriting your data each time is good laziness. It could indeed be dangerous - because a user could accidentally change the data on the form and submit an error. By rearranging your form so that people input changes only, perhaps by using a dropdown to select the old name and new qualification, or a text box to enter a new name and a new qualification. If you are using SQL then you could update it will an UPDATE query something like  UPDATE person_qual SET qual = (SELECT id FROM qual_id WHERE qual = 'MA') WHERE person IN (SELECT id FROM name_id WHERE name = 'Alice'); If you are manually implementing your own database with text files, you will probably have to rewrite the file each time, though you could perhaps just append a line each time - thus allowing you to undo changes easily.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2022-01-21 13:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (58 votes). Check out past polls.

    Notices?