InimistTech Blogs

Web & Mobile App Tech Weblog

  • Home
  • Laravel
  • React
  • Javascript
  • Linux
  • PHP
  • git
  • WordPress
  • Hindi to Unicode

Category: MySQL

Changing database character set

Arvind KumarMySQL, WordPressLeave a Comment on Changing database character set
mysql-logo

Why to consider changing database character set? Why do i need to do this? As to find a more straight answer please look at the image below, taken from one of my websites built in WordPress:

How to delete duplicate MySQL records with duplicate field value (as ID)

Arvind KumarMySQL, WordPressLeave a Comment on How to delete duplicate MySQL records with duplicate field value (as ID)

For some reason i had duplicate entries in my WP database. The ID field in wp_users table was tempered with and was changed to Non Auto-Increment to insert records on the will. I deleted all ID=null records manually and then…

Read More→

Conditional order by sorting using two fields in MySQL

Arvind KumarMySQLLeave a Comment on Conditional order by sorting using two fields in MySQL

Here’s the scenario. I have two fields in my “listings” table with help of which i wanted to sort (order by) results. First field is “activation_date”. It is the activation date of a listing. Second one is “featured” which stores…

Read More→

How to update a mysql table with the count of another table while using like statement

Arvind KumarMySQLLeave a Comment on How to update a mysql table with the count of another table while using like statement

While working on a web links directory i wanted to update categories table’s num_listings column with the count of listings under each category. The category id was stored something like this in listings table:

A few notes on joining a MySQL table to itself to get unique combination of field data

Arvind KumarMySQLLeave a Comment on A few notes on joining a MySQL table to itself to get unique combination of field data

Just a few notes on joining a MySQL table to itself to get unique combination of data stored in its fields. Suppose we have a MySQL table named `keywords` having fields `word1`, `word2` and `word3`. Once we have got a…

Read More→

Fixing ‘mysql’ is not recognized as an internal or external command in Windows7

Arvind KumarMiscelleneous, MySQL, WAMP, Windows14 Comments on Fixing ‘mysql’ is not recognized as an internal or external command in Windows7

Having WAMP installed when i try to type mysql in my windows command prompt it would give me the following error:

Calculating difference between two mysql dates in seconds

Arvind KumarMySQL1 Comment on Calculating difference between two mysql dates in seconds

Here is a quick way to calculate the difference between two mysql dates in number of seconds. In my case, i required to fetch all entries for which the difference between current time stamp and date in a table field…

Read More→

MYSQL custom sorting – order by field value

Arvind KumarMySQL, PHP2 Comments on MYSQL custom sorting – order by field value

In this simple example I will show you a way to perform a custom sorting in MySQL. In this guide of custom sorting I am going to sort mysql rows based on the alphabetical order of the field values. Most…

Read More→

Full-text search in MySQL

Arvind KumarMySQLLeave a Comment on Full-text search in MySQL

Normally, most of us use “SELECT * FROM table WHERE field1 LIKE ‘%$keyword%’” OR field2 LIKE ‘%$keyword%‘ ..etc” to search our table and get results. This is slow and inefficient approach, as it does return all (too many) rows in…

Read More→

To find mysql recodrs between specific date range based on start date and end date fields

Arvind KumarMySQL, PHP2 Comments on To find mysql recodrs between specific date range based on start date and end date fields

While working on a report generation system i had to perform a query to check whether records exist in ‘reports’ table between a date range received from two form fields “start_date” and “end_date”. To make it more specific i will…

Read More→

Posts navigation

Previous 1 2
  • Useful Linux Commands
  • Enlighter Example - CSS
  • Disk Space Usage Commands
  • Top Directory Linux commands

Recent Posts

  • Getting Started with the MERN Stack: A Beginner’s Guide
  • Introduction to Node.js for Beginners
  • How to Modify WooCommerce Templates
  • How to Encrypt and Decrypt Data in PHP
  • How to Create a Custom Gutenberg Block in WP (Step-by-Step)

About Arvind

Arvind Thakur is a Full Stack Web Developer. He founded and runs a Software Development company by the name Inimist Technologies in Chandigarh, India. >> know more
Copyright © All rights reserved.
Blog Kit by WP Charms
Facebook
fb-share-icon
LinkedIn
Share
WhatsApp
Follow by Email
Twitter
Post on X
Reddit
Pinterest
Instagram
RSS
Telegram