1<?php 2 3/* assumes that you have the freetds db.lib on windows */ 4 5dl('php_pdo.dll'); 6dl('php_pdo_sybase.dll'); 7 8try { 9 10$db = new PDO('sybase:', 'pdo', 'pdo'); 11$db->setAttribute(PDO_ATTR_ERRMODE, PDO_ERRMODE_EXCEPTION); 12debug_zval_dump($db); 13 14$stmt = $db->prepare('select 10'); 15debug_zval_dump($stmt); 16 17$x = $stmt->execute(); 18debug_zval_dump($x); 19 20while (($r = $stmt->fetch())) { 21 print_r($r); 22} 23 24} catch (Exception $e) { 25 print $e; 26} 27 28$stmt = null; 29$db = null; 30echo "All done\n"; 31?> 32