Added some database tweaks

This commit is contained in:
Paul committed 2014-01-03 15:55:28 +00:00
1 parent 084c2558fb
commit 4cabc12a29
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ DROP DATABASE temp;
CREATE USER 'webshop'@'localhost' IDENTIFIED BY 'pass'; CREATE USER 'webshop'@'localhost' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON `webshop\_%` . * TO 'webshop'@'localhost'; GRANT ALL PRIVILEGES ON `webshop\_%` . * TO 'webshop'@'localhost';
DROP DATABASE webshop_sql1; DROP DATABASE IF EXISTS webshop_sql1;
CREATE DATABASE webshop_sql1; CREATE DATABASE webshop_sql1;
USE webshop_sql1; USE webshop_sql1;
+3 -3
View File
@@ -62,10 +62,10 @@
/** /**
* Maak verbinding met de database * Maak verbinding met de database
*/ */
$connection = mysql_connect('localhost', 'webshop_sql1', 'pass') $connection = mysql_connect('localhost', 'webshop', 'pass')
or die('Kan geen verbinding maken met MySQL'); or die('Kan geen verbinding maken met MySQL');
$db = mysql_select_db('webshop', $connection) $db = mysql_select_db('webshop_sql1', $connection)
or die('Kan de database niet selecteren'); or die('Kan de database niet selecteren');
@@ -88,7 +88,7 @@ while ($row = mysql_fetch_array($result)) {
</div> </div>
</li> </li>
<? <?php
} }
mysql_close($connection); mysql_close($connection);