Anonymous - Thu, 24/10/2013 - 11:12

Permalink

this really helped me
<?php
try
{
$db = new PDO('odbc:Driver=FreeTDS; Server=hostname_or_ip; Port=port; Database=database_name; UID=username; PWD=password;');
}
catch(PDOException $exception)
{
die("Unable to open database.Error message:$exception.");
}
echo 'Successfully connected!';
$query = 'SELECT * FROM table_name WHERE table_name.COLUMN = ?';
$statement = $db->prepare($query);
$statement->bindValue(1, 'Value', PDO::PARAM_STR);
$statement->execute();
$result = $statement->fetchAll(PDO::FETCH_NUM);
?>

CAPTCHA