这是打开的分类表。
这是oc_posts
具有以下列的表:
idPost | idCategory | type | title | description
这是另一个包含oc_posthits
这些列的表:
idHit | idPost | hitTime
我想获得点击量的标题列表,一个标题的点击量。完整列表。
我想像在打击示例中一样制作变量
$dynamicList = "";
$sql = mysql_query("SELECT * FROM oc_posts ORDER BY title ASC");
$productCount = mysql_num_rows($sql); // count the output amount
if ($productCount > 0) {
while($row = mysql_fetch_array($sql)){
$idPost=$row['idPost'];
$postType=$row['type'];
$postTitle=$row['title'];
$category=$row['category'];//real category name
$fcategory=$row['fcategory'];//frienfly name category
$idCategoryParent=$row['idCategoryParent'];
$fCategoryParent=$row['parent'];
$postPassword=$row['password'];
$insertDate=$row['insertDate'];
$dynamicList .= '<table width="1000" border="0">
<tr>
<td width="800">' .$postTitle.'<a href="http://capitalclassified.com/manage/?post='.$idPost.'&pwd='.$postPassword.'&action=delete">Delete</a></td>
<td width="150">'.$insertDate.'</td>
<td width="50"><div class="bannerad">
<a href="http://capitalclassified.com/manage/?post='.$idPost.'&pwd='.$postPassword.'&action=edit">Edit</a>
</div> </td>
<td width="50"><div class="bannerad">
<a href="http://capitalclassified.com/manage/?post='.$idPost.'&pwd='.$postPassword.'&action=delete">Delete</a>
</div> </td>
</tr>
</table>';
}
// if successful redirect to delete_multiple.php
if($result){
echo "<meta http-equiv=\"refresh\" content=\"0;URL=listing.php\">";
}
}
mysql_close();
?>