我的while循环继续将最后一条记录发送到我的模态

时间:2016-11-29 08:38:55

标签: php

我试图将记录的名称发送到我的模态并回显| async及其constructor(private _cocktailService: CocktailService) { this.cocktails = _cocktailService.getCocktails().map( res => this.cocktails = res ); } ,但我继续只获取最后一条记录。

以下是我的代码:

declare @StartDate DATE = '2016-11-19';
declare @EndDate DATE = '2016-11-29';

--SET DATEFIRST 7;

-- The dw for tuesday is 3 when @@datefirst = 7 (default setting)
-- Since it depends on a usersetting, lets calculate it anyway.
declare @TuesdayWeekday INT = (7-@@datefirst + 2)%7+1;

;with DATES as
(
  select @startdate as [Date]
  union all
  select dateadd(day, 1, [Date]) from DATES
  where [Date] < @enddate
)
select [Date], datepart(dw,[Date]) as day_of_week, datename(dw,[Date]) as day_of_weekname
from DATES
where datepart(dw,[Date]) = @TuesdayWeekday;

这是我的模态的代码:

name

我的表格示例中有三个数据:

食品 书 睡眠

当我点击食物旁边的按钮时,我的模态中的数据将是睡眠。

我希望有人会帮助我。谢谢

0 个答案:

没有答案