本文整理汇总了PHP中Mysql::doQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP Mysql::doQuery方法的具体用法?PHP Mysql::doQuery怎么用?PHP Mysql::doQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mysql
的用法示例。
在下文中一共展示了Mysql::doQuery方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Mysql
$SQL = "SELECT catid,offerid ,cat FROM " . CAT_TB . " WHERE pid=" . $SecondCat[1];
$Mysql = new Mysql(DB_NAME);
$Mysql->doQuery($SQL);
while ($obj = $Mysql->GetData()) {
if ($SecondCat[1] == $obj->catid) {
$class = "class='cur-menu'";
} else {
$class = "";
}
echo "<li " . $class . "><a href='/index.php?gOo=goods_category.dwt&gcat=" . $obj->catid . "' >" . $obj->cat . "</li>\n";
//建立三级目录
if ($_GET['pid'] == $obj->catid) {
echo "<ul id='catmenu'>\n";
$SQL2 = "SELECT catid,offerid ,cat FROM " . CAT_TB . " WHERE pid=" . $obj->catid;
$Mysql2 = new Mysql(DB_NAME);
$Mysql2->doQuery($SQL2);
while ($obj2 = $Mysql2->GetData()) {
if ($_GET['pid'] == $obj2->catid) {
$class = "class='cur-menu'";
} else {
$class = "";
}
echo "<li " . $class . "><a href='/index.php?gOo=goods_category.dwt&gcat=" . $obj2->catid . "&sub=" . $obj2->catid . "' >" . $obj2->cat . "</li>\n";
}
echo "</ul>";
}
}
} else {
}
}
}
示例2: Mysql
$Mysql2 = new Mysql(DB_NAME);
$Mysql2->doQuery($SQL2);
$curl .= "<ul id='menu-sub-" . $obj->cat_id . "' class='childli' style='display:none;'>\n";
$ulid_list .= $obj->cat_id . ",";
while ($obj2 = $Mysql2->GetData()) {
$curl .= "<li class='class-2' id='menu-a-" . $obj->cat_id . "' >";
$curl .= "<a id='li-a-" . $obj2->cat_id . "' href='" . HOME_URL . "/index.php?gOo=goods_category.dwt&gcat=" . $obj2->cat_id . "' >" . $obj2->cat . "</a>";
}
$curl .= "</ul>";
$curl .= "</li>\n";
$lastpid = $obj->pid;
$i++;
}
$curl .= "<li class='menu-bt'></li>";
$curl .= "</ul>";
echo $curl;
if ($_GET['goodsid'] != '') {
$SQL = "SELECT cat_id FROM " . GOODS_TB . " WHERE gid=" . $_GET['goodsid'];
$Mysql = new Mysql(DB_NAME);
$Mysql->doQuery($SQL);
$obj = $Mysql->GetData();
$goodscat = $obj->cat_id;
$SQL = "SELECT pid FROM " . NEW_CAT_TB . " WHERE cat_id=" . $goodscat . " ORDER BY catord ASC";
$Mysql = new Mysql(DB_NAME);
$Mysql->doQuery($SQL);
$obj = $Mysql->GetData();
$pid = $obj->pid;
echo "<div id='cat_ul_list' style='display:none'>" . $pid . "</div>";
}
echo "<div id='ul_list' style='display:none'>" . $ulid_list . "</div>";
echo "<div id='goodscat' style='display:none'>" . $goodscat . "</div>";