Posts in "MySQL"

Popular web server error codes

Oct 20, 2023

Many a time when we try to visit any particular web page, we get an error code displaying in lieu of the original page. Have you ever surprised what that...

Useful GIT commands

Sep 12, 2023

1. Repository Setup Initialize new repo git init Clone existing repo git clone https://github.com/username/repo.git Check remote repository git remote -v Add remote git remote add origin https://github.com/username/repo.git 2. Daily Workflow...

PHP function to get difference between dates

Jul 15, 2023

Below is a PHP function that calculates and displays the difference in days between two dates. This function will take two date strings as inputs, convert them to DateTime objects,...

Generate random number in PHP

Mar 31, 2023

In PHP, you can generate a random number between 1 and 9 using the rand() or mt_rand() functions. Here are examples of both: Using rand() Function: $randomNumber = rand(1, 9);...

Convert Indian currency from numeric to words in PHP

Sep 30, 2022

To convert a numeric value to Indian currency format (words), you can use a custom function. Here’s an example of how you can achieve this: This function convertToIndianCurrencyWords() converts a...

Covert all date data format from VARCHAR to DATE in any MySQL table

Jun 12, 2022

I am working on a project which was majorly developed by any otehr developer. My work is to update every module and add some functionality. This is a financial application...