There is no rank function in MySQL actually, whenever you need to query rank from table based on some functionality/criteria in MYSQL. But there are simple queries that can be used to perform the same.
Read the article to create query as well as to know about equivalent query for RANK and DENSE_RANK in MySQL.

Read More

Get the last inserted ID of a MySQL table is a simple query to obtain the primary key of the record you just inserted to the table. Here I have explained the query using PDO as well as Mysqli.

Also, I have abbreviated few points while using PDO or if you are trying to get the last inserted ID of a MySQL table in PHP using other methods.

Read More

With help of the following simple query you can find sum of multiple columns values in a row.

In the `marks` table below we have roll number and marks of each student in physics, chemistry and maths. Now we wish to find sum of marks obtained by each student.

Read More

[ Page 2 of 3 ]