Poor man’s full text search for SuiteCRM

The poor man’s CRM, a.k.a SuiteCRM, is great (… was great for its time!); that’s another story. One of the features provided is “unified search”, as the geeks call it; some may call it global/universal search across many tables and records in the database. What it does is simply as follows: Loop over a list … Read morePoor man’s full text search for SuiteCRM

MySQL Error: Thread stack overrun

Recently, I’ve come across this error: MySQL error 1436: Thread stack overrun: 164720 bytes used of a 196608 byte stack, and 32000 bytes needed. Use ‘mysqld –thread_stack=#’ to specify a bigger stack. I am using PHP 7.0 and MySQL 5.7 on a Ubuntu 16.04 VM. Basically, I was dynamically creating more than 5 long SQL … Read moreMySQL Error: Thread stack overrun

Recursive Relationships in Databases

One of the tricky issues in entity relationship model is the recursive relationships. Sometimes an entity needs to refer to itself. For example, think of an organisational chart for the roles of employees in a company; each employee is managed by a manager, each manager manages 0 or more employees. The records of all the … Read moreRecursive Relationships in Databases

Paging records in MS SQL Server 2005

After years of torturing their SQL Server users, Microsoft provided a “better” way of paging records in version 2005, and it is a weird one! The following example is from their website, an article about ROW_NUMBER (Transact-SQL).

It is simply unacceptable, non-standard, impractical! By the way, you can not use column numbers (e.g. ORDER … Read morePaging records in MS SQL Server 2005