Hopefully a pretty simple question... but since I´m a total newbie at this I can´t figure it out :9
This is what I want to do:
Check if column X contains a certain number.
If the number exists (the ID for the row) I want to Update the row.
Else, if this number (the row) doesn´t exists I want to create it.
I use INSERT INTO ... and it works the first time, but when I do it a second time it doesn´t work since the row already exists.
I guess the code could look like this:
if (???????) {
mysql_query("UPDATE.....
} else {
mysql_query("INSERT INTO...
}
So, what should the term (????) be...?
How can I solve this little problem?
Is there perhaps a better way to do it...?
//Vasse