Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php phpinfo() ?>
- PDO drivers mysql, odbc, pgsql, sqlite
- <?php
- $user = '';
- $pass = '';
- $server = '';
- $database = '';
- $connection_string = "DRIVER={SQL Server};SERVER=$server;DATABASE=$database";
- $conn = odbc_connect ( $connection_string, $user,$pass );
- $sql_string = "SELECT * FROM Leases";
- $result = odbc_exec ( $conn, $sql_string );
- while (odbc_fetch_row($result))
- {
- $rep=odbc_result($result,"rep");
- $manager=odbc_result($result,"manager");
- echo "<tr><td>$rep</td>";
- echo "<td>$manager</td></tr>";
- }
- ?>
- $sql_details = array(
- "type" => "Sqlserver", // Database type: "Mysql", "Postgres", "Sqlserver", "Sqlite" or "Oracle"
- "user" => "username", // Database user name
- "pass" => "password", // Database password
- "host" => "jqe-database", // Database host
- "port" => "", // Database connection port (can be left empty for default)
- "db" => "Leases", // Database name
- "dsn" => "" // PHP DSN extra information. Set as `charset=utf8` if you are using MySQL
- );
Add Comment
Please, Sign In to add comment