On Tue, Jun 23, 2009 at 4:20 PM, PJ<af.gourmet@xxxxxxxxxxxx> wrote: > I just had a bright idea ??? > Am doing editing file for book entries; it occurs to me (now that I am > practically finished) that it might be much simpler to delete entries > and just insert rather than going through the rigamarole of checking if > the new entries exist and if and if and if... just delete & insert - > less code, less headaches... or is this a cute fantasy & I should get > myself locked up? > Guys, don't go overboard on this... I know I'm leaving myself wide open :-P > > -- > Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." > ------------------------------------------------------------- > Phil Jourdan --- pj@xxxxxxxxxxxxx > http://www.ptahhotep.com > http://www.chiccantine.com/andypantry.php > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Try using the REPLACE statement if you are using mysql... it will allow automatic update without the UPDATE syntax and inserts if the key id is not there -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php