Ask a Question related to Coldfusion Database Access, Design and Development.
-
rmorgan #1
mysql dayofweek
I am having trouble using the dayof week in my sql statement, what is the
proper format for doing this. this is what i am trying to do:
where reqdate = dayofweek(1)
or
where reqdate = dayofweek(7)
I basically want to exclude the weekends from my query. TIA
rmorgan Guest
-
#40471 [NEW]: PHP 5.2.1 failed to be compiled with MySQl 5.0.33, MySQL 5.0.27, MySQL 5.1.15
From: pcdinh at gmail dot com Operating system: CentOS 4.4 PHP version: 5.2.1 PHP Bug Type: Compile Failure Bug description:... -
#40207 [NEW]: Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL ser
From: arif at peshawaronline dot com Operating system: PHP version: 4.4.4 PHP Bug Type: Compile Warning Bug description: ... -
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
When i try to start my mysql server, i get this error ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'... -
DayOfWeek()
Hope somebody can help. (shown without pound signs) I'm running this --- Monthnumber/daycount/Year in a loop per the current month and it is... -
Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock'
Seen this message? Can't connect to local MySQL server through socket '/tmp/mysql.sock' I got this trying to install DBI and DBD for mysql from... -
paross1 #2
Re: mysql dayofweek
What is your database? MSSQL, Access, Oracle, MySQL, ???
Phil
paross1 Guest
-
-
paross1 #4
Re: mysql dayofweek
Since DAYOF WEEK() returns a numeric, where 1=Sunday and 7= Saturday, you can
exclude weekends by selecting values returned for DAYOFWEEK(reqdate) for
between Monday (2) and Friday (6).
WHERE DAYOFWEEK(reqdate) BETWEEN 2 AND 6
Phil
paross1 Guest
-



Reply With Quote

