Skip to content

Instantly share code, notes, and snippets.

@raphaeldealmeida
Last active May 13, 2019 18:12
Show Gist options
  • Save raphaeldealmeida/4914065e1b6153c11bf9165097da1652 to your computer and use it in GitHub Desktop.
Save raphaeldealmeida/4914065e1b6153c11bf9165097da1652 to your computer and use it in GitHub Desktop.
<?php
$host = "";
$db = 'onboard';
$user = 'inffel';
$pass = "";
$conn = new PDO("sqlsrv:server=$host,1433;Database=$db", $user, $pass);
$tsql = "select * from usuarios";
//$getProducts = $conn->exec($tsql);
$getProducts = $conn->query($tsql);
$usuarios = $getProducts->fetchAll(PDO::FETCH_ASSOC);
var_dump($usuarios);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment