I have made a form in chronoforms and a database table in MySql.
One of the form fields form corresponds to a table field that is unique. As an example, let's pretend the unique field is the user's site login.
What I want to have happen is that when a user completes the form, if there is no record for that user in my table, chronoforms writes the record (which it does), but if a record already exists, then chronoforms will update the record (which it doesn't, it gives me an error).
Doing a delete first will not work because there are other fields in the table that should not be messed with, I just need to do an insert or update, as appropriate.
In short, I want to use the same form to do either an insert or update depending on which is appropriate. I know how to do this in IIS/ASP/SQL server, but I'm a Joomla newbie.
I don't understand Joomla's architecture. When I look at the auto-generated code for my form, I don't see a SQL statement at all. I could change a SQL statement, but there's not one in there! Where is the SQL actually located?
Also, I'm using chronoforms because I do NOT know php, so please speak to me as if I'm an idiot if your answer involves php coding.
Thanks for any help.
One of the form fields form corresponds to a table field that is unique. As an example, let's pretend the unique field is the user's site login.
What I want to have happen is that when a user completes the form, if there is no record for that user in my table, chronoforms writes the record (which it does), but if a record already exists, then chronoforms will update the record (which it doesn't, it gives me an error).
Doing a delete first will not work because there are other fields in the table that should not be messed with, I just need to do an insert or update, as appropriate.
In short, I want to use the same form to do either an insert or update depending on which is appropriate. I know how to do this in IIS/ASP/SQL server, but I'm a Joomla newbie.
I don't understand Joomla's architecture. When I look at the auto-generated code for my form, I don't see a SQL statement at all. I could change a SQL statement, but there's not one in there! Where is the SQL actually located?
Also, I'm using chronoforms because I do NOT know php, so please speak to me as if I'm an idiot if your answer involves php coding.
Thanks for any help.