Test PHP / ODBC / Virtuoso connection


The __virt_internal_dsn() function returns:



Connected [%s].\n

\n", $con); $query="sparql select distinct ?s ?p ?o from where { ?s ?p ?o . } limit 100"; print "Executing query [$query]
\n"; $rs = odbc_exec($con, $query); $err=odbc_errormsg($con); print "Current error state: [$err]
\n"; print "Results:
\n"; odbc_result_all($rs, "border=2"); odbc_close($con); } else { print "

Failed to connect!

\n"; } ?> ?>