Converting from MySQL commands to Oracle: HELP!

From: Mark Wilson CPU (wilson_at_cpuworks.com)
Date: 12/02/04


Date: 2 Dec 2004 12:06:35 -0800

A colleague has written a prototype program in PHP, using a MySQL
database.
It's a relatively simple app, with a restricted set of mysql commands
used (see below). The MySQL DB is being replaced with an Oracle DB
(same schema). My plan
1) globally replace the few mysql commands with intermediate
equivalents (such as myDB_connect for mysql_connect)
2) those central functions would then (for now) call the original
mysql function to prove the code still works
3) replace the "innards" of the myDB_ commands with calls to the
Oracle equivalent, including connecting to the new DB
4) make sure it all still works!

Can someone provide me an equivalency for these in Oracle? Or, where
an equivalent is not available, a reasonable alternative
command/procedure? Thanks.

Commands used:

mysql_connect("localhost", "username", "userpass")
mysql_error();
mysql_select_db();
$arry = mysql_query($query)
$var = mysql_fetch_row($arry)
$numvars = mysql_num_rows( $ varsarry )
mysql_data_seek( $arry, $day )
$line = mysql_fetch_array($result, MYSQL_ASSOC)
$currdata = mysql_fetch_assoc( $currentarray )

That's the lot... thanks!
- Mark



Relevant Pages

  • Re: commands out of sync problem
    ... server and client application like this: ... Add a SQLconnection for the MySQL database ... and...tada 'commands out of sync: you can't run this command now'. ...
    (alt.comp.lang.borland-delphi)
  • Re: [SLE] MySQL Table Locked?
    ... Mysql seems to think it is fine. ... > a sql back-up of the one table that's not working ... > Check the headers for your unsubscription address ... For additional commands send e-mail to suse-linux-e-help@suse.com ...
    (SuSE)
  • Re: [SLE] MYSQL
    ... When you install mysql a "mysql" daemon user account ... > Check the headers for your unsubscription address ... "Zwei Dinge sind unendlich, das Universum und die menschliche Dummheit, ... For additional commands send e-mail to suse-linux-e-help@suse.com ...
    (SuSE)
  • RE: Remote Console on MySQL
    ... Could be wrong here but I recall a 'system' command that you can use at the mysql> prompt to run OS commands. ... Download FREE whitepaper on how a managed service can ... Download FREE whitepaper on how a managed service can help you: http://www.cenzic.com/news_events/wpappsec.php And, now for a limited time we can do a FREE audit for you to confirm your results from other product. ...
    (Pen-Test)
  • Re: OT: How I learned to stop worrying and love the RDBMS
    ... not used either to replace TurboIMAGE for a migration client. ... Oracle and DB2 to replace TurboIMAGE for migration clients and our partners ... MySQL has become. ... The primary reason for our Oracle, DB2 and MS SQL Server emphasis is because ...
    (comp.sys.hp.mpe)