2005-01-12 18:53:25 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2005-02-27 17:17:58 +00:00
|
|
|
<!-- $Revision: 1.3 $ -->
|
2005-01-12 18:53:25 +00:00
|
|
|
<reference id="ref.maxdb">
|
|
|
|
<title>MaxDB PHP Extension</title>
|
|
|
|
<titleabbrev>MaxDB</titleabbrev>
|
|
|
|
|
|
|
|
<partintro>
|
|
|
|
<section id="maxdb.intro">
|
|
|
|
&reftitle.intro;
|
|
|
|
<para>
|
|
|
|
The MaxDB PHP extension allows you to access the functionality provided by
|
|
|
|
MaxDB 7.5.0 and above. More information about the MaxDB Database server
|
2005-01-17 06:57:18 +00:00
|
|
|
can be found at <ulink url="&url.maxdb;">&url.maxdb;</ulink>.
|
2005-01-12 18:53:25 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Documentation for MaxDB can be found at
|
2005-01-17 06:57:18 +00:00
|
|
|
<ulink url="&url.maxdb.doc;">&url.maxdb.doc;</ulink>.
|
2005-01-12 18:53:25 +00:00
|
|
|
</para>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section id="maxdb.requirements">
|
|
|
|
&reftitle.required;
|
|
|
|
<para>
|
|
|
|
In order to have these functions available, you must compile PHP with
|
2005-02-27 17:17:58 +00:00
|
|
|
MaxDB support. Additionally, you must have the MaxDB SQLDBC runtime library
|
2005-01-12 18:53:25 +00:00
|
|
|
available to access the MaxDB server.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Documentation for MaxDB SQLDBC can be found at
|
2005-01-17 06:57:18 +00:00
|
|
|
<ulink url="&url.maxdb.doc;">&url.maxdb.doc;</ulink>.
|
2005-01-12 18:53:25 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Download the MaxDB SQLDBC package from
|
2005-01-17 06:57:18 +00:00
|
|
|
<ulink url="&url.maxdb.sdbc;">&url.maxdb.sdbc;</ulink>.
|
2005-01-12 18:53:25 +00:00
|
|
|
|
|
|
|
</para>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
&reference.maxdb.configure;
|
|
|
|
|
|
|
|
&reference.maxdb.ini;
|
|
|
|
|
|
|
|
&reference.maxdb.constants;
|
|
|
|
|
|
|
|
|
|
|
|
<section id="maxdb.examples">
|
|
|
|
&reftitle.examples;
|
|
|
|
<para>
|
|
|
|
All examples in the MaxDB PHP documentation use the HOTELDB demo database from MaxDB. More about this
|
2005-01-17 06:57:18 +00:00
|
|
|
database can be found at <ulink url="&url.maxdb.sampledb;">&url.maxdb.sampledb;</ulink>.
|
2005-01-12 18:53:25 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This simple example shows how to connect, execute a query, print
|
|
|
|
resulting rows and disconnect from a MaxDB database.
|
|
|
|
<example>
|
|
|
|
<title>MaxDB extension overview example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
|
|
|
<?php
|
|
|
|
/* Connecting, selecting database */
|
|
|
|
$link = maxdb_connect("maxdb_host", "maxdb_user", "maxdb_password")
|
|
|
|
or die("Could not connect : " . maxdb_connect_error());
|
|
|
|
echo "Connected successfully";
|
|
|
|
maxdb_select_db("my_database") or die("Could not select database");
|
|
|
|
|
|
|
|
/* Performing SQL query */
|
|
|
|
$query = "SELECT * FROM my_table";
|
|
|
|
$result = maxdb_query($link, $query) or die("Query failed : " . maxdb_error());
|
|
|
|
|
|
|
|
/* Printing results in HTML */
|
|
|
|
echo "<table>\n";
|
|
|
|
while ($line = maxdb_fetch_array($result, MAXDB_ASSOC)) {
|
|
|
|
echo "\t<tr>\n";
|
|
|
|
foreach ($line as $col_value) {
|
|
|
|
echo "\t\t<td>$col_value</td>\n";
|
|
|
|
}
|
|
|
|
echo "\t</tr>\n";
|
|
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
|
|
|
|
/* Free resultset */
|
|
|
|
maxdb_free_result($result);
|
|
|
|
|
|
|
|
/* Closing connection */
|
|
|
|
maxdb_close($link);
|
|
|
|
?>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
|
|
|
</section>
|
|
|
|
</partintro>
|
|
|
|
|
|
|
|
&reference.maxdb.functions;
|
|
|
|
|
|
|
|
</reference>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|