Hi,
I have a file global.php which has the following code
<?php
$conn = new COM("ADODB.Connection") or die("Cannot start ADO");
$con = $conn->Open("PROVIDER=MSDASQL;DRIVER={SQL SERVER}; Server=server;Database=mydb;UID=sa;PWD=;");
?>
Now in another file I have to access this connection. I am including this file using the syntax
include "global.php"
How can I access this connection in my file ie., how to execute the query.
$query = "select * from mytable";
(Here how to execute it)
Please help.