array:23 [?
0 => 1
1 => 2
2 => 3
3 => 4
4 => 5
5 => 8
6 => 9
7 => 10
8 => 11
9 => 12
10 => 15
11 => 16
12 => 17
13 => 18
14 => 19
15 => 22
16 => 23
17 => 24
18 => 25
19 => 26
20 => 29
21 => 30
22 => 31
]
Run Code Online (Sandbox Code Playgroud)
这是一个工作日,除了周日和周六,我有一个月数据表,我需要一个Laravel条件比较所有数据与whe
->whereYear('Clock_Day',$yearofdata)
->whereMonth('Clock_Day',$monthofdata)
->whereIn('Clock_Day','=',$workdays) //here can i use …Run Code Online (Sandbox Code Playgroud) 我从以下代码中获得了所需的选项,但我需要添加一个空选项作为返回数组的第一个值,'' => 'none',然后添加其余值.
function dropdown() {
return db_select('node', 'n')
->condition('n.type', 'abc')
->condition('n.status', 1)
->fields('n', array('nid', 'title'))
->orderBy('n.title', 'ASC')
->execute()
->fetchAllKeyed();
}
Run Code Online (Sandbox Code Playgroud)
但是,这仅提供数据库中的值.