Changes

Jump to navigation Jump to search
204 bytes added ,  13:27, 10 January 2011
==Example in [https://svn.uni-konstanz.de/dbis/basex/trunk/api/etc/php/ PHP]==
<pre class="brush:pythonphp">import <?php/* * This example shows how database commands can be executed. * Documentation: http://basex.org/api * * (C) BaseX Team 2005-11, ISC License */include("BaseXClient, time.php");
try:{ # // initialize timer $start = time.clockmicrotime(true);
# // create session $session = BaseXClient.new Session('"localhost'", 1984, '"admin'", '"admin'"); // perform command and print returned string print $session->execute("xquery 1 to 10");
# perform command and print returned string// close session print $session.execute->close("xquery 1 to 10");
# close session// print time needed session.close$time = (microtime(true) - $start)* 1000; print "\n$time ms\n";
# print time needed time = (time.clock} catch (Exception $e) - start) * 1000{ print time, "ms." except IOError as e: # // print exception print $e->getMessage();}?>
</pre>
bueraucrat, Bureaucrats, editor, reviewer, Administrators
907

edits

Navigation menu