this is an example of the actual output on the page:
image.jpg title description date
image.jpg title description date
image.jpg title description date
BUT, how do you:
show the actual image (not the ‘image.jpg’ text) with the description and date under it.
like at this site: rapbasement.com/videos/
(exactly the way they have 3 per column, 3 per row, except I want the date under each title)
the dataset table:
<?php do { ?>
<?php echo $row_recentvideos['image']; ?> |
<?php echo $row_recentvideos['title']; ?> |
<?php echo $row_recentvideos['dateAdded']; ?> |
<?php } while ($row_recentvideos = mysql_fetch_assoc($recentvideos)); ?>
the actual php:
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_recentvideos = 60;
$pageNum_recentvideos = 0;
if (isset($_GET['pageNum_recentvideos'])) {
$pageNum_recentvideos = $_GET['pageNum_recentvideos'];
}
$startRow_recentvideos = $pageNum_recentvideos * $maxRows_recentvideos;
mysql_select_db($database_recentVideos, $recentVideos);
$query_recentvideos = "SELECT id, dateAdded, title, image, video FROM videos";
$query_limit_recentvideos = sprintf("%s LIMIT %d, %d", $query_recentvideos, $startRow_recentvideos, $maxRows_recentvideos);
$recentvideos = mysql_query($query_limit_recentvideos, $recentVideos) or die(mysql_error());
$row_recentvideos = mysql_fetch_assoc($recentvideos);
if (isset($_GET['totalRows_recentvideos'])) {
$totalRows_recentvideos = $_GET['totalRows_recentvideos'];
} else {
$all_recentvideos = mysql_query($query_recentvideos);
$totalRows_recentvideos = mysql_num_rows($all_recentvideos);
}
$queryString_recentvideos = sprintf("&totalRows_recentvideos=%d%s", $totalRows_recentvideos, $queryString_recentvideos);
?>