Most people use PHP and MySQL together and there are several reasons to do so: It’s easy, fast and powerful! If you create a MySQL database result, the data is not formatted and looks ugly. The following functions or code examples will help you to create better looking MySQL database result pages.
Continue reading 3 methods to tweak your MySQL database result pagesTag: mysql
First steps after ServerPilot has been installed
If you see this message in your online ServerPilot panel, your Ubuntu web server is ready to host your websites. Or maybe not? Continue reading First steps after ServerPilot has been installed
Random banner with PHP & MySQL
This banner rotator is a little bit different from others, the banner will change only ones a day. I used the PHP function rand() because I think that MySQL’s “ORDER BY RAND()” and the PHP function array_rand() are only a second choice.
Continue reading Random banner with PHP & MySQLOptimize your MySQL Server with MySQLTuner
Login to your server’s console and download MySQLTuner (I use my user’s home directory)
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl
Optional
If you don’t like to enter the user details for every test it’s possible to create a .my.cnf file in the same directory and add a mysql admin user to access your database
Use this kind of settings:
[client] user=mysqladminuser password=dbpassword
Introduction to MySQL Joins
MySQL joins simply takes two tables and joins them together using one or more common values which they both share. For example if you had a table users and a table posts and you wanted to get all posts by a certain user you could use a query to get all posts where posts.userid = users.user_id. Continue reading Introduction to MySQL Joins