The method dow()
is a routine that provides a portable Day-Of-Week number from 0 to 6, starting on a Sunday. Normal day of week functions use varying start days, and offset numbers. For more information on the subject, see sqlDate().
The start day and numbering matches the PHP Date function.
The date/time fieldname to be processed
0 | Sunday |
1 | Monday |
2 | Tuesday |
3 | Wednesday |
4 | Thursday |
5 | Friday |
6 | Saturday |
$sql = "SELECT {$db->dow('birth_date')} FROM employees WHERE emp_no = 10 $dayOfWeek = $db->getOne($sql);