Tag: mysql commands

How to connect PHP to MySQL database on another server using PDO and MySQLi

If normally the source code and database are on the same hosting server, you only need to set the server name to localhost. However, in many cases where we need to use an additional database or have an external server IP range, a little setup is required on this additional server. When connecting via IP […]


Some useful MySQL query commands

This article lists some MySQL commands that may be helpful for you. I. MySQL commands 1. COUNT and GROUP BY If you want to display a list of how many tutorials are written by each user, you can use COUNT and GROUP BY. For example, we have the Blogs table as follows:     SELECT operator_id, count(*) as count […]