I'll do that. When I load an article I supply the article's id.
-- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- Please reply on the list/newsgroup unless the reply it OT. "Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi JJ: > > On Sun, Aug 11, 2002 at 01:44:53AM +1000, JJ Harrison wrote: > > > > Which has a save or a publish option. I only want to keep one copy of each > > article in the DB. This adds a new one each time. I know about updates in > > SQL but the file may or may not already be in the db. Does anyone have a > > good way to go about this? > > Here's a quick outline of what I do. I have a form for entering in > articles. If the form is opened without an ArticleID, the ArticleID (a > hidden form field) becomes 0. But, if the form is opened with an > ArticleID, the given ArticleID is put in the hidden field. > > Now, when I make my changes and hit the Save (submit) button, the script > checks the ArticleID. If it's 0, do an insert. If it's non-zero, do an > update. > > --Dan > > -- > PHP classes that make web design easier > SQL Solution | Layout Solution | Form Solution > sqlsolution.info | layoutsolution.info | formsolution.info > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php