Find jobs - Find jobs - Free Credit Repair - Deaf Topics - Internet Advertising

PDA

View Full Version : sequel problem


gilgalbiblewheel
May 12th 2006, 8:59 pm
I don't even have 1 in the field. I don't know why it's reading 1.

Heres' what I have:
<td colspan="1" align="center">
<%
'This SQL statement creates a list of books
SQL1 = "Select title, chapter FROM scarletandthebeast WHERE title = '" & title & "'"
'& " ORDER BY Chapter ASC"

response.write sql1 & "</br>"
rs.Open sql1,conn, 1
%>
<select name="title" id="title" size="5" style="width:500;" onchange="go('refresh');" <%'onchange="go2();"%>>
<%
Do until RS.eof
%>
<option <%if title = rs("title") then response.write "selected" end if%> value="<%=RS("title")%>"><%=RS("title")%></option>

<%
rs.movenext
if rs.eof then
exit do
end if
Loop
%>
</select>
<%
rs.close

%>
</td>

And it's reading:
Select title, chapter FROM scarletandthebeast WHERE title = '1'

THis is what it should read instead of 1:

preface
"Scriptural Clues to the ""Mystery of Iniquity"""
Scripture, History and Conspiracy

anjanesh
May 14th 2006, 11:30 am
Whats the value of title when you have a response.write title before your SQL1 =... line ?

gilgalbiblewheel
May 14th 2006, 1:54 pm
I made some changes. There was a function on reading numbers (I was using a recycled code). I added numbers in the field. I understand the sql now.