Best Practice

Best Practice

Basic Security in Dotkernel Headless Platform

Software security should always be in the back of your mind as a developer. It may seem fine at first to deliver a feature sooner, only to find later on that you left a backdoor into your crisp new up…

Read more →
Best Practice

ZF Is Retired. Laminas MVC Is Retiring. Consider It Solved

It all started with the announcement: Laminas MVC Is Retiring. Some people wrongfully thought everything with a Laminas logo is going away - NOT SO! Read on for a bit of history about Zend and Laminas…

Read more →
Best Practice

htaccess 301 redirect non-www to www

To always redirect users to the www site (for example: http://dotboost.com to http://www.

Read more →
Best Practice

Using LIKE wildcards with Zend_Db

Continuing the Zend_Db article series, let's discuss the LIKE condition. The LIKE condition allows you to use wildcards in the WHERE clause of an SQL statement.

Read more →
Best Practice

Why use CURRENT_TIMESTAMP on a field that record date/time?

On a TIMESTAMP field that records date and time when inserting a new record, it is encouraged to use as a DEFAULT value, the CURRENT_TIMESTAMP constant. Why? Because when inserting a new row in the ta…

Read more →
Best Practice

INSERT, UPDATE, DELETE statements with Zend_Db

Continuing the Zend_DB article series, we are stopping now at DML statements. DML (Data Manipulation Language) statements are statements that change data values in database tables.

Read more →
Best Practice

Subqueries with Zend_Db

Continuing the Zend_DB article series, we are stopping now at subqueries. As you note, the below is a complicate query, with COUNT(), LEFT JOIN(), GROUP BY - select from 3 tables, and make a count fro…

Read more →
Best Practice

What are returning the FETCH functions from Zend_Db

Continuing the Zend_DB article series, we are stopping now at FETCH methods that are in Zend_Db_Adapter_Abstract: array fetchAll (string|Zend_Db_Select $sql, , ) array fetchAssoc (string|Zend_Db_Selec…

Read more →
Best Practice

SQL queries using Zend_Db – SELECT

Zend_Db and its related classes provide a simple SQL database interface for Zend Framework. To connect to MySql database, we are using Pdo_Mysql adapter : $db = Zend_Db::factory('Pdo_Mysql', $dbConnec…

Read more →