What i should know about MySQL

+2 Yannis Sp · August 29, 2014
I am using MySQL for my projects but i always used the basics.Like making a table and then fill it with values through php and then selecting items from there etc.But now that i'm making a more serious project with more data i want to know more about the MySQL.Like which method to use(Mysqli or PDO),can i combine two tables so i don't need to call them each separately,how to improve the speed of the site from a better organised database etc.I would be really glad if someone give me a good answer :) Thank you in advance.

Post a Reply


Oldest  Newest  Rating
+1 Faiz Ahmed Rana · August 29, 2014
"which method to use(Mysqli or PDO)" 

I would recommend PDO.

mysqli improves this (as the name suggests) by adding parameterized queries and a few other things into the mix.

PDO is an extension that abstracts several database drivers into one package, i.e. it allows you to use the same code to connect to MySQL, Oracle, MS SQL Server and a number of other databases without needing to use database specific extensions or rewrite your code when you switch databases (in theory at least). It also supports parameterized queries.

You may also like to see this page: http://code.tutsplus.com/tutorials/pdo-vs-mysqli-which-should-you-use--net-24059

"can i combine two tables so i don't need to call them each separately"

I think you should learn about SQL Joins.

SQL joins are used to combine rows from two or more tables.

This page may help you with joins: http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/
  • 1

SQL & Databases


Everything SQL and Databases related in here!

Bucky Roberts Administrator