I was wondering if it is possible to do this logic in a single mysql statement.

Check if a record exists

if FALSE
insert record into database
else
update record

I'd like to do this with a single sql query. I know there is a function to check the existance of a table, but i'm trying to check the existance of the record.

Could you possibly write a conditional in mysql? If so any insight would help.

Thanks

Jesse

    Write a Reply...