Home > front end >  Asp database how to invoke multiple conditions
Asp database how to invoke multiple conditions

Time:12-17

Calls to the database code:
<%
The set rs2=server. Createobject (" adodb. You ")
Sql2="select * from [class1] where id=" & amp; Class1 & amp;" "
Rs2. Open sql2, conn, 1, 1
Eof then if rs2. Bof or rs2.
'the response. Write "no record"
End the if
Dim tit22
Class1 tit22=rs2 (" ")
% & gt;

Code above [class1] means the name of the column, where id="& amp; Class1 & amp;" "Means the columns below the list of articles,

Rendering is delimit the inside of the black line, the current he is "in" sort to sort, just enter ranked first,





I want to make the system with the "recommended" on the front, according to the back of the recommended in according to

"recommendations" of the code in the system call is rs. Open the "select * from jle_info where tuijian=1 and z=1 order by FBSJ desc", conn, 1, 1


how to modify the code below, please? Thank you!! The good life of peace!!!!!

<%
The set rs2=server. Createobject (" adodb. You ")
Sql2="select * from [class1] where id=" & amp; Class1 & amp;" "
Rs2. Open sql2, conn, 1, 1
Eof then if rs2. Bof or rs2.
'the response. Write "no record"
End the if
Dim tit22
Class1 tit22=rs2 (" ")
% & gt;

CodePudding user response:

Two tables? Or is a piece of table, recommendations are one of the field?

CodePudding user response:

2 tables, just from [class1] where id="& amp; Class1 & amp;" "Form is not recommended fields, but the from jle_info where tuijian=1 and z=1 order by FBSJ desc form has recommended fields,

The from jle_info where tuijian=1 and z=1 order by FBSJ desc table is jle_info recommended fields is for FBSJ tuijian=1 release time

CodePudding user response:

[class1] and jle_info have correlation, have the associated associated jle_info table then use jle_info tuijian sort fields

CodePudding user response:

Class1, can have his column, so the system is the original code:
<%
The set rs2=server. Createobject (" adodb. You ")
Sql2="select * from [class1] where id=" & amp; Class1 & amp;" "
Rs2. Open sql2, conn, 1, 1
Eof then if rs2. Bof or rs2.
'the response. Write "no record"
End the if
Dim tit22
Class1 tit22=rs2 (" ")
% & gt;

But there is no recommended class1 form fields, the recommended fields in jle_info form


How to integrate 2 form sql2="select * from [class1] where id=" & amp; Class1 & amp;" "Take jle_info tuijian=1 in a table, according to the priority is also recommended, according to the priority is not recommended to display, thank you
  •  Tags:  
  • ASP
  • Related