假设我有一个房地产网站,并且在默认页面中,我想让用户获得符合他的参数的帖子数量
我添加 了一个示例图像的链接
计数器应该对每次更改做出反应并自动向用户显示数字(这将在 ajax jquery 中执行)
我写了一个查询,但只有在填写了所有参数后它才会起作用,并且我希望能够填写一些并且仍然让计数器工作
这是查询
ALTER PROCEDURE shahar30_nadlan.CountPropertyResultsByquery
@AreaID int,
@DealID int,
@PropertyTypeId int,
@FieldMax int,
@FieldMin int,
@RoomsMax decimal,
@RoomsMin decimal,
@PriceMax int,
@PriceMin int,
@ParkingSpace bit,
@Elevator bit,
@Aircondition bit,
@Furniture bit,
@Warehouse bit,
@Balkony bit,
@handicapped bit,
@Immediate bit,
@Description NVARCHAR(MAX)
AS
BEGIN
select count(*) from Tbl_Property
where AreaID = @AreaID and
DealID = @DealID and
PropertyTypeId= @PropertyTypeId and
Field <= @FieldMax and
Field >= @FieldMin and
Rooms <= @RoomsMax and
Rooms >= @RoomsMin and
Price <= @PriceMax and
Price >= @PriceMin and
ParkingSpace = @ParkingSpace and
Elevator = @Elevator and
Aircondition = @Aircondition and
Furniture = @Furniture and
Warehouse = @Warehouse and
Balkony = @Balkony and
handicapped = @handicapped and
[Immediate] = @Immediate and
Description like '%' + @Description + '%'
END
谢谢你,沙哈尔·纳迪亚。