Tag: sql

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 […]

Read more...

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 […]

Read more...

Optimize your MySQL Database Performance

MySQL is a free database management system widely used in PHP. When creating tables in MySQL there are many types of Storage Engine to choose from. MyIsam & Innodb & Memory are three popular types. Choosing a store tool is extremely important before you design the database, helping to improve query performance. If the store engine […]

Read more...