MySQL CREATE TABLE

Using CREATE TABLE statement in MySQL you can create a table into the database. The following example shows the statement in the simple form: CREATE TABLE Format: CREATE TABLE IF NOT EXISTS `tbl` ( tbl_id int(11) NOT NULL AUTO_INCREMENT, tbl_title varchar(100) DEFAULT NULL, post_date DATE DEFAULT NULL, update_date DATE DEFAULT NULL, PRIMARY KEY (tbl_id) ) […]

Data Types – MySQL

MySQL supports different data types while creating columns i.e. what type of value is using for the column or fixed/variable length etc. It has different types of data types i.e. Numeric: TINYINT, SMALLINT, MEDIUMINT, INT, BIGINT, DECIMAL, FLOAT, DOUBLE, BIT String: CHAR, VARCHAR, BINARY, VARBINARY, TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT, ENUM, SET […]

CSS3 required styles

Using HTML5 required style you can validate your form and show error. But sometimes you need to give a style like keep the color red for error or green on success.  Here’s how to use CSS3 required. Here is a sample example for required css: <!DOCTYPE html> <html> <head> <title>CSS3 styles</title> <style type=”text/css”> input[type=”checkbox”]:required:invalid + […]