<?php
require('path/to/DatabaseAccess.Class.php');
$DbAccess = new DatabaseAccess("yourHost", "dbName", "dbUser", "dbUserPassword");
$ID = "1000"; // Some ID to select
$DbAccess->PrepareStatement("SELECT * FROM `UserAccounts` WHERE `ID` = :ID");
$DbAccess->BindParameter(":ID", $ID);
$userData = $DbAccess->ExecuteQuery_Get();
// Test that something was returned
if (count($userData) < 1)
return;
// Note that data is always returned as an array of arrays
var_dump($userData[0]);
|