Esempio n. 1
0
 *	http://en.wikipedia.org/wiki/Indent_style
 *	Indentation style is usually a matter of preference. However, even the
 *	cited Wikipedia article on code indentation describes it as having the
 *	most advantages in terms of code readability at a glance, reducing the
 *	occurence of bugs.
 * - Other exceptions
 *	The code standard is broken when there seems to be valid reason
 *	(e.g.: code readability) on a case-by-case basis.
 */
require_once 'json-common.php';
use browseStorage\TableClass;
use browseStorage\RawSQL;
// ============================================================================
// ####  Sources  #############################################################
// ============================================================================
TableClass::$data_sources = array('mysql_demos' => array('engine' => "mysql", 'server' => "localhost", 'schema' => "demos", 'user' => "demos", 'passwd' => "xxx"), 'sqlite_demos' => array('engine' => "sqlite", 'file' => "../browseStorage-demos/demos.sq3"));
// ============================================================================
// ####  Tables  ##############################################################
// ============================================================================
$select_client = "SELECT ClientID,   Name    FROM Clients    ORDER BY Name    ASC";
$select_trip = "SELECT TripID,     Title   FROM Trips      ORDER BY Title   ASC";
$select_country = "SELECT CountryID,  Name    FROM Countries  ORDER BY Name    ASC";
$select_currency = "SELECT CurrencyID, NameISO FROM Currencies ORDER BY NameISO ASC";
/**
 * Table keys should *not* contain:
 * * Forward slashes ('/') -- confuses AngularJS router arguments, even
 *   though this is not used at this time
 * * Pipes ('|') -- confuses automatically generated keys when table=*
 * * Newlines ('\n') or carriage returns ('\r') -- may confuse their
 *   usage in HTML/HTTP
 */