Location: PHPKode > scripts > sqltoolkit > sqltoolkit/sample.php
<title>Sample Usage</title>
<body bgcolor="white">
<h1>Sample Usage of sql.php</h1>
<h2>A Quick Start</h2>
<p>1. Include the code in you page</p>

<p>2a. Run a "quick" query which will handle all the open and closing of the database connections for you.</p>
	$result = database_quick_query($datasource_mysql, "select * from test");


<p>2b. Manage your own connections and run querys</p>
	$connection = database_connect($datasource_pg);
	$result     = database_query($connection, "select * from test");

<p>3. Do something with the results</p>

<p>That's it!</p>

<hr />

<p>If you have configured your datasource_config.php file already, you may actually see a result set below:</p>

$result = @database_quick_query($datasource_mysql, "select * from test");

Return current item: sqltoolkit