好涉水所以我有這一塊的違規代碼:通過另一個「程序員」 PHP/MySQL的代碼
<!-- Begin the Product Group Submenu -->
<ul>
<?php do { ?>
<li><a href="prodgrouppg.php?groupid=<?php echo $row_menugroup['GroupID']; ?>&groupname=<?php echo $row_menugroup['GroupName']; ?>"><?php echo $row_menugroup['GroupName']; ?></a>
<!-- Retrieve the individual products related to the Group -->
<?php
$groupprod_menuprod = "-1";
if (isset($row_menugroup['GroupID'])) {
$groupprod_menuprod = (get_magic_quotes_gpc()) ? $row_menugroup['GroupID'] : addslashes($row_menugroup['GroupID']);
}
mysql_select_db($database_conn_atex, $conn_atex);
$query_menuprod = sprintf("SELECT products.ProductID, products.ProductName, products.ProductGroup FROM products WHERE products.ProductGroup=%s ORDER BY products.ProductName", GetSQLValueString($groupprod_menuprod, "int"));
$menuprod = mysql_query($query_menuprod, $conn_atex) or die(mysql_error());
$row_menuprod = mysql_fetch_assoc($menuprod);
$totalRows_menuprod = mysql_num_rows($menuprod);
?>
<!-- Begin the product submenu (final menu) -->
<ul>
<? $row_menuprod = mysql_fetch_assoc($menuprod))
{
echo
<li>
<a href="productpg.php?prodid=<?php echo $row_menuprod['ProductID']; ?>">
<? echo $row_menuprod['ProductName']; ?>
</a>
</li>
</ul> <!-- end of Product Submenu -->
</li>
<?php } while ($row_menugroup = mysql_fetch_assoc($menugroup)); ?>
</ul> <!-- end of Group Submenu -->
</li>
<?php } while ($row_menusubcat = mysql_fetch_assoc($menusubcat)); ?>
</ul> <!--end of Subcategory Submenu-->
</li> <!--end of Category Submenu-->
<?php } while ($row_menupaging = mysql_fetch_assoc($menupaging)); ?>
</ul> <!--end of Menu -->
這基本上剛剛停止工作無章可循。如果我刪除了這段代碼,那麼對這個文件的要求就會通過OK,所以我假設這裏有問題。我已經嘗試過重新格式化大約5次,所以我認爲必須有一些我的眼睛缺失的東西。
有什麼建議嗎?道歉爲此代碼的狀態..試圖修復它一次更好的一塊..
可能有助於不把另一個人稱爲「程序員」。 – Woot4Moo 2011-05-02 20:07:43
+1謝謝; ;你應該看到其餘的....嘆息.. – 2011-05-02 20:14:12