include "db.inc.php";
$sqlSelect = "SELECT * FROM gbBlog WHERE blogType LIKE '%$_GET[label]%' ORDER BY blogDate DESC";
$rsSelect = execSQL($sqlSelect);
echo "
";
while ($tableauSelect = mysql_fetch_array($rsSelect))
{
echo "";
echo "
";
echo "";
echo "$tableauSelect[blogTitle]";
if (isset($_SESSION['username']))
{
echo " Delete";
echo " - Edit";
}
echo "
";
echo "Written by $tableauSelect[blogAddBy] on $tableauSelect[blogDate]
";
echo "$tableauSelect[blogText]
";
$labelsArray = explode(", ", $tableauSelect[blogType]);
echo "Labels : ";
foreach ($labelsArray as $label)
{
$labelURL = urlencode($label);
echo "$label ";
}
echo "
";
$sqlComment = "SELECT * FROM gbComment WHERE commentBlogID='$tableauSelect[blogID]'";
$rsComment = execSQL($sqlComment);
$nbComment = mysql_num_rows($rsComment);
echo "$nbComment comments";
echo "
";
echo "
";
echo "
";
echo "
";
}
echo "";
?>