Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $db = 'C:UwAmpwwwkorek.accdb';
- $user = '';
- $password = '';
- if(!file_exists($db)){
- die('Error finding access database');
- }
- $connection = odbc_connect("Driver={Microsoft Access Driver (*.mdb,
- *.accdb)};Dbq=$db", $user, $password);
- if($connection){
- echo("yes connect");
- }
- try{
- $sql = 'SELECT * FROM [ALL];';
- $result = odbc_exec($connection, $sql);
- while(odbc_fetch_row($result)){
- $id = odbc_result($result,6);
- echo $id."<br>";
- }
- }catch(PDOExepction $e){
- echo $e->getMessage();
- }
- odbc_close($connection);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement