bigredkacy
03-26-2009, 06:48 AM
http://integyfacts.com/betafolder/wordpress/?page=images&imgid=60
On the right side of my page im trying to get the script to echo the clicks for the image. The echo works in the description. Please look at my right side to see if you can pinpoint any coding errors.
<h5>Number of Clicks</h5></i><? echo mysql_result($yy,0,"img_clicked"); ?></td></td>'; is where i am calling the echo
<table border="0">
<?php
$query="select * from wp_imgManager_images where img_isapproved='Y' ORDER BY img_clicked DESC";
$result=mysql_query($query);
$rcount=mysql_num_rows($result);
$imgid=$_GET['imgid'];
$dd="select * from wp_imgManager_images where id='".$imgid."'";
$yy=mysql_query($dd);
if($rcount>0)
{
$icount=0;
echo '<tr>';
$colcount=0;
for($i=0;$i<$rcount;$i++)
{
$icount=$icount+1;
$colcount=$colcount+1;
if($icount==8)
break;
if($colcount==3)
{
$colcount=1;
echo '</tr><tr>';
}
$icatid=mysql_result($result,$i,"img_cat_id");
$qq="select cat_virt_path from wp_imgManager_categories where id='".$icatid."'";
//echo $qq;
$rr=mysql_query($qq);
$vcpath=mysql_result($rr,0,"cat_virt_path");
$imgPath=$vcpath."/".mysql_result($result,$i,"id").".".mysql_result($result,$i,"img_fileextn");;
echo '<td width="110" align="center"><a href="?page=images&imgid='.mysql_result($result,$i,"id").'"><img width="100" height="100" src="'.$imgPath.'"></a><i><h5>Number of Clicks</h5></i><? echo mysql_result($yy,0,"img_clicked"); ?></td></td>';
}
if($icount==0)
{
echo '<td>No latest images</td></tr>';
}
else
{
echo '</tr><tr><td colspan=3 align="right"><a href="?page=images">more..</a></td></tr>';
}
}
else
{
echo "No latest images!!";
}
?>
</table>
On the right side of my page im trying to get the script to echo the clicks for the image. The echo works in the description. Please look at my right side to see if you can pinpoint any coding errors.
<h5>Number of Clicks</h5></i><? echo mysql_result($yy,0,"img_clicked"); ?></td></td>'; is where i am calling the echo
<table border="0">
<?php
$query="select * from wp_imgManager_images where img_isapproved='Y' ORDER BY img_clicked DESC";
$result=mysql_query($query);
$rcount=mysql_num_rows($result);
$imgid=$_GET['imgid'];
$dd="select * from wp_imgManager_images where id='".$imgid."'";
$yy=mysql_query($dd);
if($rcount>0)
{
$icount=0;
echo '<tr>';
$colcount=0;
for($i=0;$i<$rcount;$i++)
{
$icount=$icount+1;
$colcount=$colcount+1;
if($icount==8)
break;
if($colcount==3)
{
$colcount=1;
echo '</tr><tr>';
}
$icatid=mysql_result($result,$i,"img_cat_id");
$qq="select cat_virt_path from wp_imgManager_categories where id='".$icatid."'";
//echo $qq;
$rr=mysql_query($qq);
$vcpath=mysql_result($rr,0,"cat_virt_path");
$imgPath=$vcpath."/".mysql_result($result,$i,"id").".".mysql_result($result,$i,"img_fileextn");;
echo '<td width="110" align="center"><a href="?page=images&imgid='.mysql_result($result,$i,"id").'"><img width="100" height="100" src="'.$imgPath.'"></a><i><h5>Number of Clicks</h5></i><? echo mysql_result($yy,0,"img_clicked"); ?></td></td>';
}
if($icount==0)
{
echo '<td>No latest images</td></tr>';
}
else
{
echo '</tr><tr><td colspan=3 align="right"><a href="?page=images">more..</a></td></tr>';
}
}
else
{
echo "No latest images!!";
}
?>
</table>