farruinn
10-06-2007, 07:07 PM
Hi, I'm fairly green when it comes to SQL. I'm writing a scheduling program for the camp I run using PHP and mySQL 5.
I have a form for registering a participant in sessions. I would like the same form to make new entries in the database if they haven't been registered for anything yet and to replace sessions if they have been registered for other sessions already.
My question is, is there a single SQL statement I can use for this or should my PHP script determine if an insert or update command is needed?
I have a form for registering a participant in sessions. I would like the same form to make new entries in the database if they haven't been registered for anything yet and to replace sessions if they have been registered for other sessions already.
My question is, is there a single SQL statement I can use for this or should my PHP script determine if an insert or update command is needed?