Friday , 19 July 2024
Breaking News
Home > Tutorials > MySQL


Finding Values in Comma Separated String Using MySQL

In most cases, We give the various options of choices to choose on websites in form of checkbox and stores various values of choices in a column of MySQL database as a comma separated . For example we store user’s preferred hobby in user table’s hobbies(varchar(250)) field(column). Value stored in this field may be like 1,2,5,6,1 or may be ‘sports’,’gardening’,’cooking’,’reading’. ... Read More »

How to Get SUM of Values Matching Item ID from another Table with INNER JOIN

Assalam-o-Alaikum! Dear friends today we will learn about INNER JOIN and GROUP BY. Sometimes you need to calculate some value that relates to another table or you need to pull some data from another table, for this you need Joining method. Here is a problem that we will solve. Problem: Suppose you have two tables, one is Items and second ... Read More »

How to Get Records From Multiple Tables and Show Into One Column

Assalam-o-Alaikum! Dear friends hope you will be fine. Today we will discuss on a problem which will make our work easy. Our some coding of PHP will reduce. Today we are going to learn a MySQL query technique in which you will fetch records from multiple tables and show in one column. So let’s start. Problem: Suppose you have three ... Read More »

Some Useful Math Functions in MySQL

Assalam-o-Alaikum! Dear visitors today I will tell you about some maths functions available in MySQL. In past, I often used PHP functions to calculate desired values but later I realized that MySQL has powerful functions that calculate data based on given criteria. We are not going to discuss all functions here but some basic and useful functions will be discussed today. ... Read More »

How to Concatenate Single Column Values with MySql

Today we will solve a problem related to MySQL query. Here is a problem:- Let’s suppose you have a table named “Items” and it has three fields and following data:- Id Item_name Price 1 Item 1 10 2 Item 2 20 3 Item 3 30 Now you want to write a query that will get all values from “Items” column ... Read More »

Ad Test