navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

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

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

Microsoft MVP

 

AND and AND and AND!

 
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 >> AND and AND and AND!
Page: [1]
 
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
AND and AND and AND! - 11/10/2004 16:25:04   
Does anyone know how I can make a statement with 2 ANDs?

I have this

mySQL = "SELECT KeyDocuments.DocTitle, Regions.RegionName FROM KeyDocuments, Regions WHERE (KeyDocuments.RegionID='" & RegionSelected & "') AND (KeyDocuments.RegionID=Regions.RegionID)"

and I want this (or the equivalent that works)

mySQL = "SELECT KeyDocuments.DocTitle, Regions.RegionName FROM KeyDocuments, Regions WHERE (KeyDocuments.RegionID='" & RegionSelected & "') AND (KeyDocuments.RegionID=Regions.RegionID) AND KeyDocuments.WebsiteSection='News'"

Any ideas???

BeTheBall

 

Posts: 6336
Joined: 6/21/2002
From: West Point Utah USA
Status: offline

 
RE: AND and AND and AND! - 11/10/2004 17:22:16   
Does this work?

mySQL = "SELECT KeyDocuments.DocTitle, Regions.RegionName FROM KeyDocuments INNER JOIN Regions ON KeyDocuments.RegionID=Regions.RegionID WHERE (KeyDocuments.RegionID='" & RegionSelected & "' AND KeyDocuments.WebsiteSection='News')"

_____________________________

Duane

Some people are like Slinkies . . . Not really good for anything . . . . . But they still bring a smile to your face when you push them down a flight of stairs.

(in reply to yogaboy)
yogaboy

 

Posts: 377
Joined: 5/22/2004
Status: offline

 
RE: AND and AND and AND! - 11/11/2004 7:31:39   
It did work - thanks a lot Duane.:)

(in reply to BeTheBall)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> AND and AND and AND!
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