Skip to content

Instantly share code, notes, and snippets.

@pierew
Last active August 2, 2016 18:20
Show Gist options
  • Save pierew/7056ec06cbb9212d1b238bfe286ca038 to your computer and use it in GitHub Desktop.
Save pierew/7056ec06cbb9212d1b238bfe286ca038 to your computer and use it in GitHub Desktop.
PHP Toolkit
<?php
/**
* @author Piere Woehl <[email protected]>
*/
$connection
function queryDB($SQL,$FIELD) {
initDB(); // Abstract Function, you have to create yourself
global $connection;
$result = mysqli_fetch_assoc($connection->query($SQL, MYSQLI_USE_RESULT));
return $result[0][$FIELD];
}
function queryDB_RAW($SQL) {
initDB(); // Abstract Function, you have to create yourself
global $connection;
$result = $connection->query($SQL, MYSQLI_USE_RESULT);
return $result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment