|
| |
|
|
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.
|
|
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
|
|
|