[SLUG] CMS

Ian Eade at IGM Web Design ieade at igmwebdesign.info
Sat Apr 19 02:03:01 BST 2003


I find this a surprising question given that I have made you aware that I am unable to get a MySQL connection and thus cannot run Geeklog or any other MySQL driven program. 

For now I have tested Geeklog on my server and this has provided me with the view that Geeklog is worth pursuing. So if anybody has got any ideas on getting a MySQL connection please let me know, for now here is some code which I am trying.


###################################


$G_DB   = "";	# database name
$G_HOST = "";     # hostname
//$G_PORT = "";   # MySQL port
$G_PORT = "";     # MySQL port
$G_USER = "";     # MySQL username
$G_PASS = "";	# MySQL password

$db	= mysql_pconnect($G_HOST.":".$G_PORT,$G_USER,$G_PASS);
@mysql_select_db($G_DB) or die("Unable to connect to database ");

// create a test table
$sql = "create table test (id int (10),title int(10), date text)";

// try and execute
if($results = mysql_query($sql, $db)) 
{
echo 'connection made and table created';
exit();
}

$date = date("F j, Y");
$random = rand(1,5000);

// populate the table
for ($x=1; $x<21; $x++)
{
$sql = "insert into test values('$x','$random','$date')";

if (@mysql_query($sql)) 
	{
	echo '<b>Success, values added</b>';
	}
	else
	{
	echo("<p><b>Problem:</b> " . mysql_error() . "</p>");
	}
}
?>


###################################




Ian




-----Original Message-----
From: scarborough-admin at mailman.lug.org.uk
[mailto:scarborough-admin at mailman.lug.org.uk]On Behalf Of Jamie Adams
Sent: Friday, April 18, 2003 11:53
To: scarborough at mailman.lug.org.uk
Subject: [SLUG] CMS


Whats the url of this geeklog on the slug site then? or have I missed 
something obvious?

Jamie

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/





More information about the Scarborough mailing list