急!帮我看看这个问题
Cain 2003-08-22 11:04:59 <?
$StrSql="select new_confesstype.id as id,new_confesstype.type as new_type from new_confesstype,new_fabu where new_confesstype.id=new_fabu.typeid";
$Result=mysql_query($StrSql,$Server) or die($StrSql);
$Num=mysql_num_rows($Result);
while($Row=mysql_fetch_object($Result))
{
$a[$Row->id]=$Row->new_type;
}
if($Num=="")
{
echo "没有记录";
}else
{
$PageSize=12;
$i=0;
$StrSql="select * from new_fabu where 1 and typeid=$typeid order by id desc";
$Result=mysql_query($StrSql,$Server) or die( $StrSql);
$TotalPages=ceil($Num/$PageSize);
if($CurPage<1) $CurPage=1;
if($CurPage>$TotalPages) $CurPage=$TotalPages;
if($CurPage>1) mysql_data_seek($Result,($CurPage-1)*$PageSize);
while(($Row=mysql_fetch_object($Result))&&($i<$PageSize))
{
$con=substr($Row->specify,0,100);
$Print.="
<table width=\"619\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"80\">
<tr>
<td align=\"center\" class=\"unnamed2\" height=\"30\">
<table width=\"619\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"30\">
<tr align=\"center\" valign=\"middle\">
<td width=\"140\" class=\"unnamed2\"><font color=\"#009900\">【".$A[$Row->typeid]."】</font></td>
<td class=\"unnamed2\" width=\"400\" align=\"left\"> $Row->title $Row->addtime</td>
<td width=\"140\" class=\"unnamed2\">$Row->province $Row->city</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=\"50\" align=\"left\" valign=\"top\" class=\"unnamed2\">
<table width=\"619\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"50\">
<tr>
<td width=\"80\"> </td>
<td align=\"left\" valign=\"top\" class=\"unnamed3\" width=\"539\"><a href=\"shichangdongtai_gongqiu1.php?ID=$Row->id\">$con...</a></td>
</tr>
</table>
</td>
</tr>
</table>
";
$i++;
}
}
$Page=preg_replace("/>$CurPage /","><font color=#FF0000>$CurPage</font> ",$Page);
if($CurPage<=1)
{
$Prev=$CurPage;
}else{
$Prev=$CurPage-1;
}
if($CurPage>=$TotalPages)
{
$Next=$CurPage;
}else{
$Next=$CurPage+1;
}
if($submit)
{
header("location:shichangdongtai_gongqiu.php?typeid=$typeid&&CurPage=$goto");//这里$typeid没有值,我该怎么改?
}
$c="1 or typeid=2 or typeid=3 or typeid=4 or typeid=5";
$tpl=new EasyTemplate("shichangdongtai_gongqiu.htm");
$tpl->assign("search",getsearch($Addtime,$Typeid,$City));
$tpl->assign("NNTop",$NNTop);
$tpl->assign("NTop",$NTop);
$tpl->assign("gongqiu_list",$Print);
$tpl->assign("Num",$Num);
$tpl->assign("TP",$TotalPages);
$tpl->assign("CP",$CurPage);
$tpl->assign("LP","shichangdongtai_gongqiu.php?typeid=$typeid&&CurPage=$TotalPages");
$tpl->assign("Prev","shichangdongtai_gongqiu.php?typeid=$typeid&&CurPage=$Prev");
$tpl->assign("Next","shichangdongtai_gongqiu.php?typeid=$typeid&&CurPage=$Next");
$tpl->assign("all","shichangdongtai_gongqiu.php?typeid=$c");
$tpl->assign("supplier","shichangdongtai_gongqiu.php?typeid=2");
$tpl->assign("procure","shichangdongtai_gongqiu.php?typeid=1");
$tpl->assign("teamwork","shichangdongtai_gongqiu.php?typeid=3");
$tpl->assign("agency","shichangdongtai_gongqiu.php?typeid=4");
$tpl->assign("enrol","shichangdongtai_gongqiu.php?typeid=5");
$tpl->easy_print();
?>
除了我标出来的$typeid值无法传递到if($submit)里之外,当我翻页的时候,会有这个错误:
Warning: Offset 12 is invalid for MySQL result index 3 in /www/users/focusforever.com/qiye/commercialservice/marketing/shichangdongtai_gongqiu.php on line 36
我该怎么办?