Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:01
Tableless test
Poster: lawvest
Dated: Tuesday July 4 2006 - 15:50:18 BST
Hi Andy,
Thanks for getting back to me. I did a tableless test here:
http://www.yourbackyardgarden.com/testmilonic.html
And I am still experiencing the problem. There must be something else going on with the way we configured things.
Here is the file:
menudata.php
<?php
extract($_GET);
extract($_POST);
include("config.php");
if(!$DB)
{
ob_start();
include ("includes/inc.db.php");
include ("includes/inc.registry.php");
//Creating an instance of an Class clsITXDBTr
$DB=new clsITXDBTr($dbhost, $dbuname, $dbpwd, $dbname);
}
?>
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="100%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#f4fbea";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=95);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="<?=$PUBLIC?>milonic/arrow.gif";
subimagepadding=2;
}
with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=10;
orientation="vertical";
style=menuStyle;
position="relative";
menuwidth=150;
itemwidth=163;
aI("status=Back To Home Page;text=Garden Store Home;url=<?=$PUBLIC?>store;");
<?php
$categoryArray=array();
$index=0;$flag=0;$boo=0;
/*$sel="SELECT c.top_category_name,c.top_category_id FROM ".$dbprefix."product p, ".$dbprefix."subcategory s, ".$dbprefix."category_master c
WHERE p.sub_category_id = s.sub_category_id AND s.top_category_id = c.top_category_id
GROUP BY c.top_category_id";*/
$sel="select * from ".$dbprefix."category_master order by top_category_name";
$qry=$DB->doSQL($sel);
while($top=mysql_fetch_array($qry))
{
//$qry1="select sub.*,top.top_category_name from ".$dbprefix."subcategory sub,".$dbprefix."category_master top where sub.top_category_id=top.top_category_id and sub.top_category_id=".$top['top_category_id']." order by sub.sub_category_name";
$qry1="select * from ".$dbprefix."subcategory where top_category_id=".$top['top_category_id'];
/*
$qry1="SELECT c.top_category_name FROM ".$dbprefix."product p, ".$dbprefix."subcategory s, ".$dbprefix."category_master c
WHERE p.sub_category_id = s.sub_category_id AND s.top_category_id = c.top_category_id
GROUP BY c.top_category_id";*/
$sub_qry1=$DB->doSQL($qry1) or die(mysql_error()."....".$qry1);
if(mysql_num_rows($sub_qry1)!=0)
{
$catName=$top['top_category_name'];
$category_name=$catName;
$top_category_id=$top['top_category_id'];
$catnameArray[$flag]=$catName;
$categoryArray[$index]=$top_category_id;
$category_name=$catName;
$search=strpos($category_name,"&");
if(!$search===false)
$category_name=str_replace("&","*",$category_name);
$search_space=strpos($category_name," ");
if(!$search_space===false)
$category_name=str_replace(" ","_",$category_name);
$cname[$boo]=$category_name;
?>
aI("showmenu=<?=$catName?>;text=<?=$catName?>;url=<?=$PUBLIC?>store/<?=$category_name?>;");
<?php
$index++;$flag++;
}
}
?>
}
<?php
for($i=0;$i<count($categoryArray);$i++)
{
$qry="select sub.*,top.top_category_name from ".$dbprefix."subcategory sub,".$dbprefix."category_master top where sub.top_category_id=top.top_category_id and sub.top_category_id=".$categoryArray[$i] ." order by sub.sub_category_name";
$sub_qry=$DB->doSQL($qry);
?>
with(milonic=new menuname("<?=$catnameArray[$i]?>")){
overflow="scroll";
style=menuStyle;
<?php
while($sub=mysql_fetch_array($sub_qry))
{
$que="select * from ".$dbprefix."product where sub_category_id=".$sub['sub_category_id'];
$subq=$DB->doSQL($que);
$topCatName=$sub['top_category_name'];
$top_find=strpos($topCatName,"&");
if(!$top_find===false)
$topCatName=str_replace("&","*",$topCatName);
$top_find_space=strpos($topCatName," ");
if(!$top_find_space===false)
$topCatName=str_replace(" ","_",$topCatName);
$subCatName=$sub['sub_category_name'];
$subcategory_name=$sub['sub_category_name'];
$find=strpos($subcategory_name,"&");
if(!$find===false)
$subcategory_name=str_replace("&","*",$subcategory_name);
$find_space=strpos($subcategory_name," ");
if(!$find_space===false)
$subcategory_name=str_replace(" ","_",$subcategory_name);
if(mysql_num_rows($subq)!=0)
{
?>
aI("text=<?=$subCatName?>;url=<?=$PUBLIC?>store/<?=$topCatName?>/<?=$subcategory_name?>;");
<?php
}
}
?>
}
<?php
}
?>
drawMenus();
Bruce
Poster: Andy
Dated: Tuesday July 4 2006 - 15:52:14 BST
Hi,
Have you tried running the queries on their own.
Could be a MySQL problem or that the query is ineficcient.
See how long it takes for the queries to run and then let us know
Cheers,
Andy
Thanks
Poster: lawvest
Dated: Tuesday July 4 2006 - 15:54:20 BST
Thanks Andy,
Sorry I accidently posted as a new topic instead of a reply to my prior topic.
I will have the team look at that and get back to you.
Bruce