RE: [PHP-DB] Oracle question
| From: | Shashank Tripathi | Date: | Mon, 24 Jul 2000 15:12:26 +0000 |
| Subject: | RE: [PHP-DB] Oracle question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1434@lists.php.net to get a copy of this message | ||
Hi Rikki,
I have had similar issues. Anyway, you can get started with the following
ODBC code, hopefully this will work wihtout the need for any DLLs....
-----------------------<code>--------------------------
<?php
/* ------------------------------------------------------------------ */
/* Configuration monitor..modify only the the things in this section */
/* ------------------------------------------------------------------ */
$dsn = "ORCL";
$username = "SHANX";
$password = "*****";
$tablename = "Table1";
/* ------------------------------------------------------------------ */
$conn = odbc_connect ($dsn, $username, $password);
$query = "SELECT * FROM " . $tablename;
$result = odbc_do ($conn, $query);
echo "Result: $result <br>Query: $query <p>";
while (odbc_fetch_into ($result, &$all))
{
$ctr = 1;
foreach ($all as $value)
echo ("<b>" . odbc_field_name($result, $ctr) .
"</b>: $value <br>");
$ctr++;
}
echo ("<p>");
}
?>
-----------------------<code>--------------------------
Let me know if this works.
Cheers
Shanx
-----Original Message-----
From: Miller, Rikki [mailto:RikkiMiller@clearchannel.com]
Sent: Monday, July 24, 2000 10:51 PM
To: 'php-db@lists.php.net'
Subject: [PHP-DB] Oracle question
Hello,
I'm having an issue with Oracle interfacing with php. It appears that I
need a module included into php for the Oracle commands in php to work. I'm
not sure how to get this module or what it is. Does anyone have experience
with this? I'm working on a win32 environment, but that doesn't mean that
someone who has done it in Unix wouldn't be able to help me if they can tell
me what component I need. Thank you for the assistance in advance.
Thank you,
Rikki Miller
Intranet Web Guy