Mysql query between 2 dates from multiple tables that has relation

Mysql query between 2 dates from multiple tables that has relation

Hi i have trouble with my query.

Hi i have trouble with my query.

I have a gridview that counts all the students who have that particular ailment according to their section. And what i want is to filter between 2 dates since i have multiple tables.

    Dim query As String

query = "SELECT count(student_id) as i from students, patient, ailment 
         WHERE students.sid=patient.student_id AND 
         patient.ailment_id=ailment.ailment_id and section WHERE 
         patient.date_created BETWEEN @d1 AND @d2"

Dim data_table As New DataTable
sql_command = New MySqlCommand(query,

sql_command.Parameters.Add("@d1", MySqlDbType.DateTime).Value = 
sql_command.Parameters.Add("@d2", MySqlDbType.DateTime).Value = 

Dim adapter As New MySqlDataAdapter(sql_command)

DataGridView1.DataSource = data_table


Datagrid link for datagrid sample

Error link to query error

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

VB.Net Save button not adding data to text file

I'm still new to VB.Net and have been stuck on this for a little over an hour. I'm trying to create an inventory management system where a form opens up for the user to enter pc specs and when I click save will save to the text file, so that it is read into the Inventory Tracker screen. Where each text box is disabled and appends the text as it is updated.

How to make a Windows Service from .Net Core 3.0

NET Core 3.0, it's a lot easier to create Windows Services: just a single line of code ... If the application runs on a Windows system, the method ..

how to update column in database MySQL

I am trying to update my database column, using data from datagridview column. I am using MySQL for database and for program.