Skip to content

MySQL TIMEDIFF Less than an hour, invalid time

I have a function in MySQL that will select the time someone clocked in, and select the time someone clocked out and link them together. It will calculate how many hours that person has been on the clock in total between two provided dates. I then created another function that selects the break events and sub…

MySQL syntax for summing several count data

I have a MySQL table called things_they_own with two columns: person and thing and my primary key is the combination of the two. Thus, there are several rows where the first column is a certain person with the thing column being different for each, and several rows where the second column is a certain thing a…