Archive for the 'mysql' Category


12 Jan 2019

mysql date range creation

11:36 | database, mysql | 32 views

Goal: create a date range Simple question to create a date range from a start date to an end date. 1. date dimension table – previously created range Simple, let’s create a date dimension table filled up with the days from a specified day to the future(?). This is a very dangerous if we forget […]


16 Dec 2017

PDO bind value list for IN statement

4:14 | mysql, tricky | 330 views

Goal: pass value list to IN statement The PDO variable binding is easy until you want to use an IN statement like with PDO after the binding this statement is not working because in the background the select statement will be like this: Luckily the mysql knows the following tricky form and the bindable form […]


12 Oct 2017

Table column names comma delimited list

21:12 | mysql | 208 views

Goal: quick method to get the column names comma delimited list Simple mysql or mariadb database. How to get a detailed select command if I don’t have a good sql gui tool. So, here is an easy way: where TABLE_SCHEMA is your schema, and TABLE_NAME is the table in the question. The result will be […]


6 Jun 2017

mysql comma delimited result

2:32 | mysql | 159 views

Goal: select a quick comma delimited value for a column The method is easy. In this example the result is a long string contains comma delimited list of the language names. the result something like this: But the working buffer size is a weak point in this story. The correct way something like this: So […]


8 Jun 2014

mysql event_scheduler after server restart

14:40 | mysql | 269 views

Goal: to avoid the event_scheduler stopped after server restart As I realized the events scheduler never working after my server restarted. The why is in the my.ini file. Find the [mysqld] section and put the following line event_scheduler=ON like this. So when the server restarted the event scheduler will be alive again.



#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }