Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Sorry, i got another displaying question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Sorry, i got another displaying question

 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: Sorry, i got another displaying question
    Posted: 09 April 2005 at 3:55pm
I am having a problem that some of you guys may have encountered before.
I have my database table having a "Menu_id" field which is used for the javascript of showing the popup menus and i need a alternative way of querying the database and displaying the code and if the menu_id is different start over. The code i have right now is
 
<%
db_PATH = "D:\Inetpub\wwwroot\Sky-WorldForum\pchoops-com\database\pchoops.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 teampages where school='" & schoolid & "' and menu_id='JHcb34e555z45azerffx3xeg4r'"
 db_RS.CuRSorType = 2
 db_RS.LockType = 3
 db_RS.Open db_SQL, db_CON
%>

<%
if not db_rs.eof then
startsubmenu("JHcb34e555z45azerffx3xeg4r")
while not db_rs.eof
submenu db_RS("title"), domain & script_name & "?sid=" & schoolid & "&spid=" & db_RS("id")
db_RS.movenext
wend
endsubmenu()
else
startsubmenu("JHcb34e555z45azerffx3xeg4r")
submenu "No Content Published", "#"
endsubmenu()
end if
%>
 
where i specified the menu_id is what needs to be changed each time and the "JHcb34e555z45azerffx3xeg4r" is one of the menu ids, Pretty much i made 5 of the above with different menu_id's
 
Please help me on this one its been bugging me for a while now since the code works but i cant find another efficient way that wont most likely crash in the end


Edited by thefrost - 09 April 2005 at 3:56pm
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.