Location: PHPKode > scripts > SQL Store > sql-store/example.php
<?php
require('sql.cls.php');
/*
This class is a sql class that prevents reruns of qerys
How this works is when ever a query is run it stores it and
store the raw sql output then if a project uses this sql all the way thoughout
the running of the application it will prevent the rerun of querys using
the raw SQL Stored lowering load times and mysql flooding
*/

//define connection using standard port 3306
$sql = new sql('host','username','password','database');
//define connection using another port
//$sql = new sql('host','username','password','database','port');

// Set a Query to run
$sql->set_query('SELECT * FROM `TEST`');

// Get the data from the query using fetch assoc
$sql->fetch_assoc();

// Get the data from the query using fetch array
$sql->fetch_array();

// Run Standad query
$sql->query();

?>
Return current item: SQL Store