First of all hello to all. My problem is that after I create my custom block, the blocks that follow after it seem to lose their database connection or something similar, I'm not quite sure. For example, if my custom block is weighted at 3 on the right side, my Surveys block weighted at 4 will come up with 'There isn't content right now for this block.' and the advertising block weighted at 5 will be completely blank.
Here is my code which just chooses a random picture url and name from a database and then displays them as a link to a module. The block works properly other than the problem with the blocks which follow it.
// create connection
$conn = mysql_connect($hname, $uname, $pword);
if (!$conn) {
die ("Couldn't connect to server : " . mysql_error());
}
// select database
$db = mysql_select_db($dbase, $conn);
if (!$db) {
die ("Couldn't select $dbase : " . mysql_error());
}
// sql statement to pull values
$sql = "SELECT * FROM cams WHERE 'cam_name' !='' ORDER BY RAND() LIMIT 1";
// execute SQL query and get result
$sql_result = mysql_query($sql,$conn);
if (!$sql_result) {
die ("Couldn't execute query : " . mysql_error());
}
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum