Sorry for the late response, but try this:
Code:
<?php
$username="";
$password="";
$database="";
mysql_connect(localhost,$username,$password);
mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM showdates ORDER BY date DESC LIMIT 5";
$info=mysql_query($query);
$num=mysql_numrows($info);
$sql = "select dateofevent from test where dateofevent > (select curdate())";
$result = mysql_query($sql);
$i=0;
while ($i < $num) {
$date=mysql_result($result,$i,"date");
$venue=mysql_result($result,$i,"venue");
$location=mysql_result($result,$i,"location");
$information=mysql_result($result,$i,"information");
while($record = mysql_fetch_object($res))
{
echo "<tr><td>$date</td><td>$venue</td><td>$location</td><td>$information</td></tr>";
}
$i++;
}
mysql_close();
?>
Not tested, but should work. Hope this helps.
As for the code you posted above, this section can be removed:
Code:
$dbObject = new database($host,$user,$passwd);
$dbObject->dbSelect($db);
$dbObject->executeSql($sql);
$res = $dbObject->transferResult();
because you did not reference the class that code-ex posted. Also, you had already made a connection to the database at the beginning of your code.
Bookmarks