Categories
MySQL

Reset auto increment values in MySQL

When you assign one field as a primary key you can use auto-increment attribute to that field. It generates unique identity for the row inserting a unique auto increment value. You can also reset auto increment values. For example if a table has 5 rows and you insert another row then the automatic value for […]

Categories
MySQL

MySQL Transaction

Using MySQL you can COMMIT a statement and ROLLBACK to manage transaction. While adding a data into two or more tables where one primary key for one table is the foreign key of another table it may happen sometimes that after adding data into first table MySQL failed to add data into second table due […]

Categories
Monetize

No Investment for Any Online Jobs

For making money, online jobs are becoming very popular and easy to maintain around the world. Million of users are using online jobs for making extra income for part time from home. Online Jobs are becoming very popular in India & all over the world for earning Money online from home without any investment. Now […]

Categories
MySQL

MySQL – Find and Replace text in a table

Using ‘replace’ you can find and replace text of a column in a table. Example of Replace text: UPDATE `tbl` SET `field_name` = replace(field_name, ‘old_text’, ‘new_text’);

Categories
MySQL

MySQL INSERT statement

To insert data into tables you can use MySQL INSERT statement. Simple syntax of MySQL INSERT: INSERT INTO table(column1,column2..) VALUES (value1,value2,..), (value1,value2,..); You can also insert from another table also i.e. clone: INSERT INTO tbl_1 SELECT * FROM tbl_2;

Categories
Creative blog

Create a free Blog on WordPress.com

WordPress blog is nothing but converting your hobby into business. So by business or profession share your thoughts on a subject you love. Blogging is free and you can create blog on blogger or WordPress. Let’s see how to start a WordPress Blog: Go to http://wordpress.com Fill up the online form. In the blog address […]

Categories
Php

array_map: stop writing foreach() cycles

Php 5.3 has a solution for ignoring for(), foreach() cycles that will reduce the average number of iteration structures you need to write i.e. array_map. This function in PHP sends each value of an array to a user defined function, and then returns an array with new values that is given by the user defined […]

Categories
MySQL

MySQL LIKE Operator

Using MySQL LIKE operator you can search based on patterns. It is used in the WHERE clause in SELECT statement. This basically use two characters for using the MySQL LIKE operator: ‘%’ – allows you to match zero or more characters‘_’ – allows you to match any single character For searching the first character starts […]

Categories
MySQL

MySQL DELETE Statement

Using MySQL delete state you can delete table data. With a single delete statement you can delete one or more tables data at a time. Example of MySQL DELETE: DELETE FROM users WHERE status = 0; For multiple table: DELETE users, orders FROM users, orders WHERE users.user_id = orders.user_id AND users.status = 0; TRUNCATE TABLE […]

Categories
MySQL

Mysql Query tips & tricks

Few Mysql queries that will help you develop websites and resolve complex codes. Here are few Mysql Query tips: Finding 2nd highest salary in employee table SELECT MAX(`salary`) from tbl where `salary` < (select MAX(`salary`) from tbl); Mysql order by FIELD SELECT * FROM tbl ORDER BY FIELD(first_name,’John’) desc, FIELD(last_name,’Doe′) ASC; Show category-parent category SELECT […]