summary refs log tree commit diff stats
path: root/includes/db.php
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2008-11-19 17:27:03 -0500
committerStarla Insigna <hatkirby@fourisland.com>2008-11-19 17:27:03 -0500
commit24503e3abe705acde2df159aeae61be0d009f92e (patch)
tree8debbd53dcd0db2f5934c5e2af4e697e3787781d /includes/db.php
downloadfourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.gz
fourisland-24503e3abe705acde2df159aeae61be0d009f92e.tar.bz2
fourisland-24503e3abe705acde2df159aeae61be0d009f92e.zip
Imported sources
Diffstat (limited to 'includes/db.php')
-rwxr-xr-xincludes/db.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/includes/db.php b/includes/db.php new file mode 100755 index 0000000..8cc5449 --- /dev/null +++ b/includes/db.php
@@ -0,0 +1,49 @@
1<?php
2/*
3 444444444
4 4::::::::4
5 4:::::::::4
6 4::::44::::4
7 4::::4 4::::4 Four Island
8 4::::4 4::::4
9 4::::4 4::::4 Written and maintained by Starla Insigna
104::::444444::::444
114::::::::::::::::4 includes/db.php
124444444444:::::444
13 4::::4 Please do not use, reproduce or steal the
14 4::::4 contents of this file without explicit
15 4::::4 permission from Hatkirby.
16 44::::::44
17 4::::::::4
18 4444444444
19*/
20
21if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22
23require('headerproc.php');
24
25// Make the database connection.
26mysql_connect($dbwebhost, $dbwebuser, $dbwebpasswd);
27mysql_select_db($dbwebname);
28
29function db_single_select($query)
30{
31 $getitem1 = $query;
32 $getitem2 = mysql_query($getitem1) or die($getitem1);
33 $getitem3 = mysql_fetch_array($getitem2);
34 return $getitem3;
35}
36
37function db_multi_select($query, $callback)
38{
39 $getitem1 = $query;
40 $getitem2 = mysql_query($getitem1) or die($getitem1);
41 $i=0;
42 while ($getitem3[$i] = mysql_fetch_array($getitem2))
43 {
44 $callback($getitem3[$i]);
45 $i++;
46 }
47}
48
49?>