Posted on 08 January 2012. Tags: group by, MySQL, order by
In Ruby on Rails, created_at and updated_at columns are MySQL timestamp columns. GROUP BY is pretty useless on a timestamp column, unless you are trying to group rows that were added at the same second. I needed to group by just the date, so in order to do this I had to manipulate the timestamp with a MySQL operator. Using the DATE_FORMAT operator, you can easily group the timestamp column using any format you want. For my example, I needed to group rows that were added on the same day. Here is my query:
Continue Reading
Posted in MySQL
Posted on 07 December 2011. Tags: Reserved, Reserved Words
Certain words such as SELECT, DELETE, or BIGINT are reserved and require special treatment for use as identifiers such as table and column names. This may also be true for the names of built-in functions.
Continue Reading
Posted in MySQL
Posted on 04 October 2011. Tags: flat file, flatfile database, sqlite
About this tutorial
This is a PHP programming tutorial for the SQLite database. It covers the basics of SQLite programming with PHP language. There are two ways to code PHP scripts with SQLite library. We can use procedural functions or OOP objects and methods. In this tutorial, we use the classical procedural style. You might also want to check the PHP tutorial or SQLite tutorial on ZetCode.
Continue Reading
Posted in MySQL, PHP
Posted on 29 September 2011. Tags: MySQL
here are the error codes for sqlite, straight from their site:
The error codes for SQLite version 3 are unchanged from version 2. They are as follows:
Continue Reading
Posted in MySQL, PHP
Posted on 29 September 2011. Tags: MySQL, PHP
I whant to write single sql for this:
if not exists (table colum value=something) insert new row else update table colum value
i know that MSSQL has this method, but how to do this in mysql?

Continue Reading
Posted in MySQL, PHP
Posted on 28 September 2011. Tags: crud, MySQL
SQL Maestro Group offers complete database admin, development and management tools for all the most popular DBMS providing the highest performance, scalability and reliability to meet the requirements of today’s database applications.

Continue Reading
Posted in MySQL, PHP
Posted on 28 September 2011. Tags: crud
I’ve been wanting to mess around with some of the new features in PHP 5.3, so I took the opportunity to write a base model class that can be used for simple db based models. This isn’t really production type code, more of an example of “look what php can do now”, although with some error handling and tweaking, it might be a good start to a lightweight active record type base class.
Continue Reading
Posted in MySQL, PHP
Posted on 28 September 2011. Tags: crud, datagrid
grocery CRUD is a library that makes a developer’s life easier. Just few lines of code and you can create a full stable CRUD with nice views. A totally automatic system that even a newbie in PHP can work with.
Full your bags (not bugs!) with the operations that you need and that’s it. To get into the world of simple programming , just open the door of our grocery, we are open!!

Continue Reading
Posted in MySQL, PHP
Posted on 28 September 2011. Tags: crud, data grid
Instant Datagrid Solution.
The phpGrid is a simple, powerful and fully customizable PHP control for generating data-bound AJAX PHP datagrid.
Create a fully functional datagrid in PHP for as little as five TWO lines of code.

Continue Reading
Posted in MySQL, PHP
Posted on 15 September 2011. Tags: encrypt, MySQL
Encrypt, Decrypt & Access Your Data in Real Time with ezNcrypt Flex!
Implied by its name, ezNcrypt Flex is a flexible platform-as-a-service (PaaS) used to protect, encrypt and provide key management for any application running on Linux. You have the power to create simple, customer rules that:

Continue Reading
Posted in MySQL