a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Hosting from $3.99 per month!

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions. dd

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Simple default query question

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Simple default query question
Page: [1]
 
nettop

 

Posts: 212
Joined: 2/9/2004
Status: offline

 
Simple default query question - 12/4/2005 17:48:59   
I have a database that has several options for a field called 'Page'. All are numbers 1-9. I want the default page to show records with the field (Page) with the numbers 2 or 3. I can't get it to work with both numbers, only with one of them. Here is my code. Thanks for your help, Tim

<!--#include file="_fpclass/fpdblib.inc"-->
<% if 0 then %>
<% end if %>
<%
fp_sQry="SELECT * FROM Results WHERE (Page like '::Page::') order by Type Asc"
fp_sDefault="Page=2"
fp_sNoRecords="No records returned."
fp_sDataConn="listings12"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&ID=3&Description_and_price=202&Business_name=202&Street_Address=202&City=202&State=202&Zip=202&Detailed_Description=203&Ownership_Structure=202&Type=202&Type_Number=3&Price=202&Area=202&Area_Number=3&Status=202&Status_Number=3&Page=202&Revenues=202&Adjusted_Net=202&Misc1=202&Misc2=202&Misc3=202&Misc4=202&Profile=202&Financial=202&Photos=202&CA=202&photo1_sm=202&photo1_lg=202&photo2_sm=202&photo2_lg=202&photo3_sm=202&photo3_lg=202&photo4_sm=202&photo4_lg=202&photo5_sm=202&photo5_lg=202&photo6_sm=202&photo6_lg=202&photo7_sm=202&photo7_lg=202&photo8_sm=202&photo8_lg=202&Owners_First_Name=202&Owners_Last_Name=202&Owners_Mailing_Address=202&Owners_City=202&Owners_State=202&Owners_Zip=202&Owners_Home_Phone=202&Owners_Cell_Phone=202&Owners_Fax=202&Owners_Email1=202&Owners_Email2=202&Timestamp=135&"
fp_iDisplayCols=2
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="_fpclass/fpdbrgn1.inc"-->
<p align="left">
			<font face="Arial"><b>
<%=FP_FieldVal(fp_rs,"Type")%></b> 
			-
<%=FP_FieldVal(fp_rs,"Description_and_price")%></font></p>
			<hr color="#000080" width="80%">
<!--#include file="_fpclass/fpdbrgn2.inc"-->



< Message edited by Spooky -- 12/4/2005 18:13:04 >
Spooky

 

Posts: 26618
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Simple default query question - 12/4/2005 18:15:56   
I think you mean something like this ?

<%
If request("page")&""="" then
fp_sQry="SELECT * FROM Results WHERE (Page ='2' OR Page='3') order by Type Asc"
else
fp_sQry="SELECT * FROM Results WHERE (Page like '::Page::') order by Type Asc"
End if
fp_sDefault="Page=2"


_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

§þ:)


(in reply to nettop)
nettop

 

Posts: 212
Joined: 2/9/2004
Status: offline

 
RE: Simple default query question - 12/4/2005 19:21:44   
Perfecto, works GREAT!!! If you check the page at http://www.paramountbusinessbrokers.com/12_done_deals.asp you can see that there are two testimonials showing, one that has a 'Page' of '2' and one has a 'Page' field of '3'.

Thanks so much, Tim

(in reply to Spooky)
Page:   [1]
OutFront Discoveries

All Forums >> Web Development >> ASP and Database >> Simple default query question
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts