Auto Increment Column is a quite common requirement in the coding. Here are some of the ways to get that in MySQL . we will also check about MySQL Auto Increment reset Auto Increment Column MySQL database The AUTO_INCREMENT attribute can be used to generate a unique identity for new rows Example use techdb; CREATE […]
Web development
MySQL COALESCE and NULLIF Function
We will be discussing MySQL COALESCE and NULLIF Function in this post. We will also be showing MySQL COALESCE examples and NULLIF MySQL Function example MySQL COALESCE Function COALESCE in MySQL is a very useful function to select first not null values from the list of values Syntax COALESCE(val1, val2,val3,…valn) The above syntax is equivalent […]
MySQL queries examples with answers
Useful and common MySQL queries examples with answers for the developer and DBA’s How to create a MySQL database mysql> create database techdb;mysql> use techdb; How to create table in mysql database? Here is the example for table creation in the MySQL database(1) We need to first get into the database use techdb; (2) Create […]
How to reset MySQL root password on your Linux server
We may sometimes need to reset the MySQL root password on your Linux server. Here are the steps to do that We need the root user privilege to do this Step1 Login as root user and Stop the MySQL server /etc/init.d/mysql stoporservice mysql stop Step 2 Start MySQL in safe mode and skip the use […]
Print/echo statement in PHP
Print/echo statement (1) Like python or other programming language, Print in PHP or echo in PHP does the same job i.e printing the statement on the screen Example <?php print “This is php script”; echo ” This is php script”; ?> This is php script This is php script So it is obvious from the […]
How to Handle HTML forms with PHP
Today in this post, I would talk about Handling HTML forms with PHP. A simple example would be registration form. Lets create a html form with php We can save this file as myregistration.html and When you will open it you will get below html form. When you fill the data and click the submit […]