MySql to Oracle 8
| From: | Dhanie | Date: | Sun, 22 Jul 2001 19:37:16 +0000 |
| Subject: | MySql to Oracle 8 | ||
| Groups: | php.general php.windows | ||
| Request: | Send a blank email to php-general+get-59088@lists.php.net to get a copy of this message | ||
Guys, How to translate this "mysql" mode to Oracle mode...
Please help me..
Thanks.
Dhanie Angel
/*************************************/
<?
// Define MYSQL server information
$server = 'localhost'; // MYSQL server;
$user = 'root'; // User to connect to MYSQL server;
$password = ''; // Password;
$database = 'guestbook'; // The name of the database;
$table = 'guestbook'; // The name of your database table;
$maxshow = 5;
?>
...
<?
mysql_connect($server, $user, $password) or die ("Can't connect!");
mysql_select_db($database) or die ("Can't open database!");
$sql = "SELECT * FROM $table ORDER BY id ASC";
$result = mysql_db_query($database, $sql);
if ($result)
{
$count = mysql_num_rows($result);
$sqlshow = "SELECT * FROM $table ORDER BY id ASC LIMIT $show, $maxshow";
$result = mysql_db_query($database, $sqlshow);
while (($myrow = mysql_fetch_array($result)))
{?>
<center>
<table border="0" width="99%" height="20"
align="center">
</tr>
<tr>
<td width="3%" bgcolor="#66CCFF" height="39"
align="center"><?echo htmlspecialchars($myrow["id"]);?></td>
<td width="19%" bgcolor="#66CCFF" height="39"><? echo
htmlspecialchars($myrow["name"]);?></td>
<td width="19%" bgcolor="#66CCFF" height="39"><?echo
htmlspecialchars($myrow["email"]);?></td>
<td width="16%" bgcolor="#66CCFF" height="39"><?echo
htmlspecialchars($myrow["message"]);?></td>
<td width="20%" bgcolor="#66CCFF" height="39"><?echo
htmlspecialchars($myrow["date"]);?></td>
</tr>
</table>
</center></div>
<div align="center">
</div>
<?}
}
else
echo "Error!";
mysql_close();
...
?>
/****************************************/