hi.! well i'm not quite sure and exactly how to do this statement on how u want to retrieve a specific date from the database
i want to select a specific date from a single table from a drop down selection box of 4 tables
here's a page includes of a drop down selection box , where comprises of 4 database tables
<select name="select2" size="1">
<option value="1" selected>News and Updates</option>
<option value="2">Resource Center</option>
<option value="3">Favourites</option>
<option value="4">Meeting Minutes</option>
</select>
____________________________________
<select name="select" size="1">
<option value="5" selected>December 2003</option>
<option value="6">November 2003</option>
<option value="7">October 2003</option>
<option value="8">September 2003</option>
<option value="9">August 2003</option>
<option value="10">July 2003</option>
<option value="11">Jun 2003</option>
<option value="12">May 2003</option>
<option value="13">April 2003</option>
<option value="14">March 2003</option>
<option value="15">February 2003</option>
<option value="16">January 2003</option>
</select>
and another page displaying the database...
<%
Dim DaTe
Set dbGlobalWeb = Server.CreateObject("ADODB.Connection"
dbGlobalWeb.Open("searchdate"
DaTe = "SELECT * FROM posts OR ListFiles OR favourites OR minutes "
If Request.Form("select2"
= "5" Then
DaTe = DaTe & " WHERE datePosted LIKE '%" & Request.Form("Title search"
& "%'"
End If
Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset"
rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3
%>
<%
If rsGlobalWeb.BOF and rsGlobalWeb.EOF Then%>
<h2 align="center">We did not find a match!</h2>
<%Else%>
<%If Not rsGlobalWeb.BOF Then%>
<h2>Here are the results of your search:</h2>
<%
Do While Not rsGlobalWeb.EOF
%>
<tr>
<td><%=rsGlobalWeb("5"
%>
<% rsGlobalWeb.MoveNext
Loop
%>
</table>
<%End If%>
<%End If%>
<%
rsGlobalWeb.Close
dbGlobalWeb.Close
%>
is there any error i've done? i dunno how to make a select statement where i choose one of the table and select the specific month to be exact... to view the dates included in that month...![[sad] [sad] [sad]](/data/assets/smilies/sad.gif)
1 drop down box for choosing which table i wanted to get the database and 1 drop down for choosing which month to be exact i want to view the information of the database..
hope u point out my mistakes ..thanks....
i want to select a specific date from a single table from a drop down selection box of 4 tables
here's a page includes of a drop down selection box , where comprises of 4 database tables
<select name="select2" size="1">
<option value="1" selected>News and Updates</option>
<option value="2">Resource Center</option>
<option value="3">Favourites</option>
<option value="4">Meeting Minutes</option>
</select>
____________________________________
<select name="select" size="1">
<option value="5" selected>December 2003</option>
<option value="6">November 2003</option>
<option value="7">October 2003</option>
<option value="8">September 2003</option>
<option value="9">August 2003</option>
<option value="10">July 2003</option>
<option value="11">Jun 2003</option>
<option value="12">May 2003</option>
<option value="13">April 2003</option>
<option value="14">March 2003</option>
<option value="15">February 2003</option>
<option value="16">January 2003</option>
</select>
and another page displaying the database...
<%
Dim DaTe
Set dbGlobalWeb = Server.CreateObject("ADODB.Connection"
dbGlobalWeb.Open("searchdate"
DaTe = "SELECT * FROM posts OR ListFiles OR favourites OR minutes "
If Request.Form("select2"
DaTe = DaTe & " WHERE datePosted LIKE '%" & Request.Form("Title search"
End If
Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset"
rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3
%>
<%
If rsGlobalWeb.BOF and rsGlobalWeb.EOF Then%>
<h2 align="center">We did not find a match!</h2>
<%Else%>
<%If Not rsGlobalWeb.BOF Then%>
<h2>Here are the results of your search:</h2>
<%
Do While Not rsGlobalWeb.EOF
%>
<tr>
<td><%=rsGlobalWeb("5"
<% rsGlobalWeb.MoveNext
Loop
%>
</table>
<%End If%>
<%End If%>
<%
rsGlobalWeb.Close
dbGlobalWeb.Close
%>
is there any error i've done? i dunno how to make a select statement where i choose one of the table and select the specific month to be exact... to view the dates included in that month...
![[sad] [sad] [sad]](/data/assets/smilies/sad.gif)
1 drop down box for choosing which table i wanted to get the database and 1 drop down for choosing which month to be exact i want to view the information of the database..
hope u point out my mistakes ..thanks....