Skip to content
Advertisement

Update row if exists or insert

I’m working on a web based PHP form that’s currently connect to an Oracle database. I’m trying to get the functionality working so that after a user submits the form it’ll check if a row exists based on the Job Number, if it does then update, otherwise insert the values.

It’s bring back an internal server error at the moment and I can’t quite see why.

Below is the code snippet…

Advertisement

Answer

In Oracle, you need to first parse, execute and then fetch before num_rows.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement