这是我的代码
Select Case activebarangay
Case "Barangay Barangka"
DataGridView1.DataSource = Exec("Select * from barangka_logbook")
reader = ExecReader("Select family_number from barangka_patient_infomation")
If reader.HasRows Then
While reader.Read
familynumberComboBox.Items.Add(reader.Item("family_number"))
End While
End If
'Member name
reader = ExecReader("Select concat(first_name,' ',middle_name,' ',last_name) from barangka_patient_infomation WHERE family_number = '" & familynumberComboBox.Text & "' ")
If reader.HasRows Then
While reader.Read
membernameComboBox.Items.Add(reader.Item("concat(first_name,' ',middle_name,' ',last_name)"))
End While
End If
这就是我所说的如果可以将Item()函数放入一个连接的字符串中:
If reader.HasRows Then
While reader.Read
membernameComboBox.Items.Add(reader.Item("concat(first_name,' ',middle_name,' ',last_name)"))
End While
怎么会这样?请帮我 结束如果
答案 0 :(得分:1)
使用选择列表中的$now = new DateTime(date('Y-m-d H:i:s'));
$duration = (new DateTime("+1 year"))->diff($now);
echo $duration->format('%a');
关键字提供字段别名,并使用别名来引用连接字段:
as