If request.form("radiobuttonname") = "title" then
sql = "select * from tablename where title='&request.from("textboxname")&"' order by filedname"
elseif request.form("radipbuttonname") = "author" then
sql = "select * from tablename where author='&request.from("textboxname")&"' order by filedname"
elseif request.form("radipbuttonname") = "subject" then
sql = "select * from tablename where author='&request.from("textboxname")&"' order by filedname"
end if
rs.open sql,conn,1,3
ปามาณนี้มั้ง
Date :
1 ก.ค. 2549 16:23:46
By :
นายกระจอก
No. 2
Guest
"นายกระจอก" ครับช่วยดูหน่อยครับ ผมแก้ไขโค้ด เป็นแบบนี้ครับ
If request.form("gtype") = "title" then
sql = "select * from images where title='&request.from('%"&keyword&"%')& order by title'"
elseif request.form("gtype") = "author" then
sql = "select * from images where author='&request.from('%"&keyword&"%')& order by author'"
elseif request.form("gtype") = "subject" then
sql = "select * from images where subject='&request.from('%"&keyword&"%')& order by subject'"
end if
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error in query expression 'title='&request.from('%แคว%')& order by title'.
/test/Show_data.asp, line 74