Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Suggesting for more efficent displaying
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Suggesting for more efficent displaying

 Post Reply Post Reply
Author
thefrost View Drop Down
Newbie
Newbie


Joined: 08 April 2005
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote thefrost Quote  Post ReplyReply Direct Link To This Post Topic: Suggesting for more efficent displaying
    Posted: 09 April 2005 at 8:22am
The way i have my site set up is that the navigation is in 2 different tables. One table has the main links and the other has the sub links. For example if you check http://pchoops.sky-world.net//pchoops-com/lite.asp?cid=SWPQ9SDTT07ZJI9KR4POI0X i have where it says links then when you go over it it has the sub links displaying.
 
 
Here is the code i have for displaying the navigation:
 ( I DIDNt USE THE CODE TAGS because for some reason it just went straight accross the screen horizontal Confused

<%
dim DBPATH, DBCON, DBRS, DBSQL
dim db_PATH, db_CON, db_RS, db_SQL
DBPATH = "D:\Inetpub\wwwroot\Sky-WorldForum\pchoops-com\database\navigation.mdb"
'--------------------------------------------------------------
 Set DBCON = Server.CreateObject("ADODB.CONnection")
 DBCON.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & DBPATH
 Set DBRS = Server.CreateObject("ADODB.Recordset")
 DBSQL = "select * from config order by menu_name asc"
 DBRS.CuRSorType = 2
 DBRS.LockType = 3
 DBRS.Open DBSQL, DBCON
while not dbrs.eof
%>
<!--START CUSTOM NAVIGATION (DO NOT MODIFY THIS) [ http://pchoops.sky-world.net ]-->
<%
'menu_id = 33 characters
MENU_ID = dbrs("menu_id")
MENU_TITLE = dbrs("menu_name")
%>
<div class="mnpMenuRow" style="BORDER-LEFT-COLOR: #999999; BACKGROUND: white; OVERFLOW-X: hidden; BORDER-BOTTOM-COLOR: #999999; WIDTH: 176px; CURSOR: default; BORDER-TOP-COLOR: #999999; BORDER-RIGHT-COLOR: #999999" menu="<%=MENU_ID%>">
<img class="mnpMenuArrow" title style="LEFT: 166px; VISIBILITY: hidden" height="7" alt="*" src="http://pchoops.sky-world.net/pchoops-com/images/arrowLTR.gif" width="4" border="0">
<%=MENU_TITLE%></div>
<!--END CUSTOM NAVIGATION [ http://pchoops.sky-world.net ]-->
<%
db_PATH = "D:\Inetpub\wwwroot\Sky-WorldForum\pchoops-com\database\navigation.mdb"
'--------------------------------------------------------------
 Set db_CON = Server.CreateObject("ADOdb.CONnection")
 db_CON.Open "DRIVER={Microsoft Access Driver (*.mdb)}; dbQ=" & db_PATH
 Set db_RS = Server.CreateObject("ADOdb.Recordset")
 db_SQL = "select * from navigation where menu_id='" & menu_id & "' order by id desc"
 db_RS.CuRSorType = 2
 db_RS.LockType = 3
 db_RS.Open db_SQL, db_CON
%>

<!--START SUB MENU NAVIGATION [ http://pchoops.sky-world.net ]-->
<%
startsubmenu(menu_id)
while not db_RS.eof
submenu db_RS("title"), domain & script_name & "?cid=" & db_RS("cid")
db_RS.movenext
wend
endsubmenu()

%><!--END SUB MENU NAVIGATION [ http://pchoops.sky-world.net ]-->
<%
dbRS.movenext
wend
%>

 
 
All help is greatly appreciated, Right now what i have up there does work but i think that in the end it may end up crashing because it is not efficiently coded the way i think it probally should be.
 
-The Frost


Edited by thefrost - 09 April 2005 at 8:23am
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.