summaryrefslogtreecommitdiffstats
path: root/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'db.php')
-rw-r--r--db.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/db.php b/db.php
index 52f51d9..10c5de2 100644
--- a/db.php
+++ b/db.php
@@ -7,8 +7,8 @@
function DB_open()
{
global $DB;
- if ( $DB = mysql_connect('localhost','dokodb', 'doko') )
- mysql_select_db('doko') or die('Could not select database');
+ if ( $DB = mysql_connect('mysql.nubati.net','doko', '$DoKo#.') )
+ mysql_select_db('dokodb') or die('Could not select database');
else
die (mysql_error());
@@ -339,4 +339,14 @@ function DB_get_hash_from_game_and_pos($id,$pos)
return "";
}
+function DB_get_all_names()
+{
+ $names = array();
+
+ $result = mysql_query("SELECT fullname FROM User");
+ while($r = mysql_fetch_array($result,MYSQL_NUM))
+ $names[] = $r[0];
+
+ return $names;
+}
?> \ No newline at end of file