Category: PHP/JS/MySQL Scripting

How to add and subtract fom time in MySQL 0

How to add and subtract fom time in MySQL

Luckily for us there is an ADDTIME function we can use to add and remove from times… The syntax is as follows: ADDTIME(datetime,time_to_change) example SELECT `emp_id` , `clock_time` , ADDTIME( ‘-01:00:00’, `clock_time` ) AS new_time FROM `timeclock` Will return emp_id clock_time new_time 10059 08:30:55 07:30:55...

How to create a ‘select all’ checkbox in javascript 0

How to create a ‘select all’ checkbox in javascript

For HTML Code: <input type=”checkbox” onClick=”toggle(this)” /> <input type=’checkbox’ name=’ss’ value=’one’ /> <input type=’checkbox’ name=’ss’ value=’two’ /> <input type=’checkbox’ name=’ss’ value=’three’ /> We use Javascript: <script> function toggle(source) { checkboxes = document.getElementsByName(‘ss’); for (var...