Jump to content

Converting To Oracle From Mysql


sf_guy

Recommended Posts

Ugh, I was just told to convert a bunch of PHP mySQL apps I didn't write to run under Oracle. I'm fairly new to PHP and know nothing about Oracle (but am trying to read up as much as I can)

 

Can any of this be accomplished via search and replace, i.e. replacing the mysqli-> calls with Oracle calls, or is it totally different and I'll have to go line by line.

 

Also, Oracle doesn't seem to offer any kind of auto-numbering (or does it?) so a lot of the tables with primary keys based on unique, ascending numbers are going to have to be changed.

 

If someone could post the equivalent of a mysqli "SELECT" and "UPDATE" for Oracle it would be HUGELY appreciated!

Link to comment
Share on other sites

I would recommend writing a database class to serve as a wrapper/interface. You would then search and replace the existing query/fetch/num_rows/affected_rows/error calls with the replacement class methods. I would then test using mysql(i) statements in your class to insure you didn't break anything. Then all you would need to do is concentrate on making the class methods produce the equivalent results using Oracle command/queries.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.