您的位置:程序门 -> web 开发 -> asp



关于查询很简单,恳请大家帮忙,分都给了,(下)


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


关于查询很简单,恳请大家帮忙,分都给了,(下)
发表于:2007-04-04 11:56:50 楼主
<!--#include   file= "inc/syscode.asp "-->
<!--#include   file= "inc/skin_css.asp "-->
<%   dim   kk
kk=request( "key2 ")
response.write   request   ( "key2 ")
set   rs=server.createobject( "adodb.recordset ")
sqltext= "select   *   from   job   order   by   id   desc "
rs.open   sqltext,conn,1,1

dim   maperpage
maperpage=4

dim   text,checkpage
text= "0123456789 "
rs.pagesize=maperpage
for   i=1   to   len(request( "page "))
checkpage=instr(1,text,mid(request( "page "),i,1))
if   checkpage=0   then
exit   for
end   if
next

if   checkpage <> 0   then
if   not   isempty(request( "page "))   then
currentpage=cint(request( "page "))
if   currentpage   <   1   then   currentpage   =   1
if   currentpage   >   rs.pagecount   then   currentpage   =   rs.pagecount
else
currentpage=   1
end   if
if   not   rs.eof   then   rs.absolutepage   =   currentpage   end   if
else
currentpage=1
end   if

call   list

'显示帖子的子程序
sub   list()%>
<!--   #include   file= "head.asp "   -->
<table   width= "760 "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
    <tr>  
        <td   height= "5 "   valign= "top "   bgcolor= "#ffffff "> </td>
    </tr>
    <tr>  
        <td   height= "72 "   valign= "top "   bgcolor= "#ffffff "> <table   width= "746 "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
                <tr>  
                    <td   class= "tdbg_left "     width= "190 "   height= "179 "   valign= "top "   >   <table   width= "100% "   border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
                            <tr>  
                                <td   height= "34 "   class= "title_left "> &nbsp;&nbsp;&nbsp; <img   src= "images/smallbook.jpg "   width= "10 "   height= "10 "> &nbsp;&nbsp;用户登陆  
                                </td>
                            </tr>
                            <tr>  
                                <td   height= "5 "> </td>
                            </tr>
                            <tr>  
                                <td   height= "10 "> <table   width= "92% "   border= "0 "   align= "center "   cellpadding= "0 "   cellspacing= "0 ">
                                        <tr>  
                                            <td>  
                                                <%   call   showuserlogin()   %>
                                            </td>
                                        </tr>
                                    </table> </td>
                            </tr>
                            <tr>  
                                <td   height= "5 "> </td>
                            </tr>
                        </table>
                        <table   width= "100% "   border= "0 "   cellpadding= "0 "   cellspacing= "0 ">
                            <tr>  
                                <td   height= "34 "   class= "title_left "> &nbsp;&nbsp;&nbsp; <img   src= "images/smallbook.jpg "   width= "10 "   height= "10 "> &nbsp;&nbsp;人才招聘 </td>
                            </tr>
                            <tr>  
                                <td> <table   border= "0 "   cellpadding= "2 "   cellspacing= "0 "   align= "center ">
                                    <form   method= "get "   name= "myform "   action= "searchjob.asp ">
                                        <tr>   </tr>
                                        <tr>
                                            <td   height= "28 ">
                                                <% 'end   if%>
                                                <input   type= "text "   name= "keyword2 "     size=12   value= "关键字 "   maxlength= "50 "   onfocus= "this.select(); ">
                                                <input   type= "submit "   name= "submit2 "     value= "搜索 ">
                                            </td>
                                        </tr>
                                    </form>
                                </table> </td>
                            </tr>
                            <tr>  
                                <td  
                                                        height=1   colspan= "2 "  
                                                        background=img/naszarym.gif> <img   height=1   src= "img/1x1_pix.gif "  
                                                            width=10> </td>
                            </tr>
                        </table> </td>
                    <td   width= "6 "> </td>
                    <td     valign= "top "> <table   class=border   width= "100% "   height= "100% "   border= "0 "   cellpadding= "0 "   cellspacing= "0 ">
                            <tr>  
                                <td   height= "206 "   valign= "top ">   <table   width= "100% "   border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
                                        <tr>  
                                            <td   class= "title_right "   height= "32 "> &nbsp;&nbsp;&nbsp; <img   src= "images/smallbook.jpg "   width= "10 "   height= "10 "> &nbsp;&nbsp;人  
                                                才   招   聘 </td>
                                        </tr>
                                    </table>
                                    <table   width= "100% "   border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
<%
if   not   rs.eof   then
i=0
do   while   not   rs.eof
%>
                        <tr>  
                            <td  
                                    height=1> <br>  
                                <table   width= "90% "   border= "0 "   align= "center "   cellpadding= "3 "   cellspacing= "1 "   bgcolor= "#000000 ">
                                                    <tr>  
                                                        <td   width= "24% "   bgcolor= "#cde0f3 ">  
                                                            <div   align= "center "> 姓名 </div> </td>
                                        <td   width= "76% "   bgcolor= "#f8fcf8 "> <%=rs( "duix ")%> </td>
                                    </tr>
                                    <tr>  
                                                        <td   bgcolor= "#cde0f3 ">  
                                                            <div   align= "center "> 分机 </div> </td>
                                        <td   bgcolor= "#f8fcf8 "> <%=rs( "rens ")%> </td>
                                    </tr>
                                    <tr>  
                                                        <td   bgcolor= "#cde0f3 ">  
                                                            <div   align= "center "> 电子邮件 </div> </td>
                                        <td   bgcolor= "#f8fcf8 "> <%=rs( "did ")%> </td>
                                    </tr>
                                    <tr>  
                                                        <td   bgcolor= "#cde0f3 ">  
                                                            <div   align= "center "> 小灵通 </div> </td>
                                        <td   bgcolor= "#f8fcf8 "> <%=rs( "daiy ")%> </td>
                                    </tr>
                                    <tr>  
                                                        <td   bgcolor= "#cde0f3 ">  
                                                            <div   align= "center "> 移动电话 </div> </td>
                                        <td   bgcolor= "#f8fcf8 "> <%=rs( "qix ")%> </td>
                                    </tr>
                                    <tr>  
                                                        <td   bgcolor= "#cde0f3 "> <div   align= "center "> 修改日期 </div> </td>
                                        <td   bgcolor= "#f8fcf8 "> <%=rs( "time ")%> </td>
                                    </tr>
                                    <tr>  
                                                        <td   height= "22 "   bgcolor= "#cde0f3 ">  
                                                            <div   align= "center "> 备注 </div> </td>
                                        <td   bgcolor= "#f8fcf8 "> <%=rs( "yaoq ")%> </td>
                                    </tr>
                                    <tr   bgcolor= "#ffffff ">  
                                        <td   height= "22 "   colspan= "2 "> <div   align= "right "> <a   href= "acceptjob.asp?job= <%=rs( "duix ")%> "> 应聘此岗位 </a>  
                                            </div> </td>
                                    </tr>
                                </table> </td>
                        </tr>
                        <%  
i=i+1  
if   i   > =   maperpage   then   exit   do  
rs.movenext  
loop  
end   if  
%>
                                    </table>   </td>
                            </tr>
    <tr>
                                <td   height= "15 "> </td>
                            </tr>
      <tr>  
                            <td  
                                    height=25   bgcolor= "#d8d8d8 ">   &nbsp;   <%
response.write   " <strong> <font   color= '#000000 '> ->   全部- </font> "
response.write   "共 </font> "   &   " <font   color=#ff0000> "   &   cstr(rs.recordcount)   &   " </font> "   &   " <font   color= '#000000 '> 条招聘信息 </font> </strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "
response.write   " <strong> <font   color= '#000000 '> 第 </font> "   &   " <font   color=#ff0000> "   &   cstr(currentpage)   &     " </font> "   &   " <font   color= '#000000 '> / "   &   cstr(rs.pagecount)   &   " </font> </strong> &nbsp; "
if   currentpage   >   1   then
response.write   " <strong> <a   href= 'job.asp?&page= "+cstr(1)+ " '> <font   color= '#000000 '> 首页 </font> </a> <font   color= '#ffffff '>   </font> </strong> "
response.write   " <strong> <a   href= 'job.asp?page= "+cstr(currentpage-1)+ " '> <font   color= '#000000 '> 上一页 </font> </a> <font   color= '#ffffff '>   </font> </strong> "
else
response.write   " <strong> <font   color= '#000000 '> 上一页   </font> </strong> "
end   if
if   currentpage   <   rs.pagecount   then
response.write   " <strong> <a   href= 'job.asp?page= "+cstr(currentpage+1)+ " '> <font   color= '#000000 '> 下一页 </font> </a> <font   color= '#ffffff '>   </font> "
response.write   " <a   href= 'job.asp?page= "+cstr(rs.pagecount)+ " '> <font   color= '#000000 '> 尾页 </font> </a> </strong> &nbsp;&nbsp; "
else
response.write   " "
response.write   " <strong> <font   color= '#000000 '> 下一页 </font> </strong> &nbsp;&nbsp; "
end   if
%>   <%
end   sub
rs.close
%>   </td>
                        </tr>
                        </table> </td>
                </tr>
            </table> </td>
    </tr>
</table>
<!--   #include   file= "inc/foot.asp "   -->
</body> </html>
上是查询页面,下是处理显示查询结果页面,现在就是在显示结果页面,看不到结果,恳请帮忙,分都给了
发表于:2007-04-04 12:11:541楼 得分:0
中以看到前面     登录....人才那部分不?
发表于:2007-04-04 12:26:272楼 得分:0
能具体点吗?
发表于:2007-04-04 12:33:473楼 得分:0
call   list

'显示帖子的子程序
sub   list()%>

你把这两句去掉试试
发表于:2007-04-04 14:09:204楼 得分:0
干脆就这样问吧,就是个查询语句,从job表中查出和idux相同的数据(数据是从别的页上传过来的值)下面是不完整的,谁帮我补全,就给分
sqltext= "select   *   from   job   where
发表于:2007-04-04 14:44:375楼 得分:0
还是不怎么明白你的意思,如果是id
= "select   *   from   job   where   id= "&request( "idux ")


快速检索

最新资讯
热门点击