# A web page that queries a database

**URL:** <https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362>\
**Category:** Factual Questions\
**Created:** [August 11, 2004, 3:25pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362 "2004-08-11T15:25:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bricker](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@Bricker](https://boards.straightdope.com/u/Bricker)\
**Post date:** [August 11, 2004, 3:25pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/1 "2004-08-11T15:25:10Z")

</div>

I know this is not a really easy question.

But…

I want to set up a web page that queries an MS SQL database. The database has a list of events, with dates. I want the page to have a drop-down box for the reader to pick type of event and a date range, whereupon the page will display the results.

I have a web server running IIS. I have a second server running MS SQL. I have enough SQL knowledge that I can write raw SQL queries. I have enough HTML experience that I can write basic pages. I understand ODBC connections. I am a quick learner. How do I do this?

Is there a quick-and-easy on-line resource to refer to? Is there a volunteer that wants to pick up a few extra dollars walking me through this off-line?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kinthalis](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kinthalis/32/16084_2.png) [@Kinthalis](https://boards.straightdope.com/u/Kinthalis)\
**Post date:** [August 11, 2004, 3:34pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/2 "2004-08-11T15:34:49Z")

</div>

You’ll need to use ASP with IIS (IIRC) and either VBscript or Java script to execute the querries and properly display the results.

It’s very simple really.

Give this a shot:

[http://www.w3schools.com/asp/default.asp](http://www.w3schools.com/asp/default.asp)

If you have any specfic questions, come back.

---

<div class="post-metadata">

**Author:** ![Ponster](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/ponster/32/17081_2.png) [@Ponster](https://boards.straightdope.com/u/Ponster)\
**Post date:** [August 11, 2004, 3:37pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/3 "2004-08-11T15:37:33Z")

</div>

Sorry but I only had 2 minutes to search…  
Try reading this until someone else comes along…

[HTML -\> SQL](http://www.windowsdevcenter.com/pub/a/oreilly/windows/ron/html_sql.html)

---

<div class="post-metadata">

**Author:** ![ZipperJJ](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zipperjj/32/211_2.png) [@ZipperJJ](https://boards.straightdope.com/u/ZipperJJ)\
**Post date:** [August 11, 2004, 3:38pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/4 "2004-08-11T15:38:16Z")

</div>

If you can’t figure it out from the link Kinthalis sent, I like dollars 😃 I do believe my email’s listed here.

---

<div class="post-metadata">

**Author:** ![Trigonal\_Planar](https://avatars.discourse-cdn.com/v4/letter/t/0ea827/32.png) [@Trigonal\_Planar](https://boards.straightdope.com/u/Trigonal_Planar)\
**Post date:** [August 11, 2004, 4:28pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/5 "2004-08-11T16:28:40Z")

</div>

I do it using php. Am I the only one?

---

<div class="post-metadata">

**Author:** ![SpaceDog](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/spacedog/32/9932_2.png) [@SpaceDog](https://boards.straightdope.com/u/SpaceDog)\
**Post date:** [August 11, 2004, 4:32pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/6 "2004-08-11T16:32:55Z")

</div>

> [@Trigonal Planar](#):
>
> I do it using php. Am I the only one?

No.

We use PHP running on RedHat servers at my (soon-to-be-ex) job and I have it setup on an IIS machine for testing at home.

But it’s whatever you’re used to or whatever molds to your background.

SD

---

<div class="post-metadata">

**Author:** ![jjimm](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@jjimm](https://boards.straightdope.com/u/jjimm)\
**Post date:** [August 11, 2004, 4:39pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/7 "2004-08-11T16:39:12Z")

</div>

I’ve spent all week trying to work out how to do this. I’m using PHP on IIS in conjunction with MySQL. [These tutorials](http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html) have been invaluable, but [this book](http://www.amazon.com/exec/obidos/tg/detail/-/0201734028/103-8948131-1690201?v=glance) allowed me to make the breakthrough I needed (today! yay!) to actually get things running.

---

<div class="post-metadata">

**Author:** ![BrotherCadfael](https://avatars.discourse-cdn.com/v4/letter/b/977dab/32.png) [@BrotherCadfael](https://boards.straightdope.com/u/BrotherCadfael)\
**Post date:** [August 11, 2004, 4:41pm UTC](https://boards.straightdope.com/t/a-web-page-that-queries-a-database/259362/8 "2004-08-11T16:41:44Z")

</div>

You can do this with asp programming. BUT, if you really want to be productive, run, do not walk, and pick up a copy of Macromedia’s Cold Fusion. Cold Fusion provides a very powerful yet easy-to-use tool to allow you to create dynamic Web pages that interface with SQL and other database back ends.

Basically, the product provides a set of HTML-style tags which you incorporate into the Web page. You can pick up the basics of using it in an hour or so. All you need is reasonable familiarity with HTML, general programming, and wirting SQL queries.

Very powerful, very easy to use, very easy to maintain. I can’t recommend it highly enough.
