Skip to main content

PHP Tutorial–Lesson 4: Introduction to PHP- Part I

 

PHP and MySql db

What is a database?

•Database is a collection of related tables.

•Each database contains from one or more tables.

•Each table consists of columns and rows.

•Columns are properties of the table.

•Rows are records of the table.

•Each table is identified by a name.

What is MySql?

•MySql is a database.

•MySql is the most popular OPEN-SOURCE database system.

•Why PHP and MySql?

•When we talk about PHP and MySql, actually we are talking about great innovations and useful tools help you in your web applications.

•Both are OPEN-SOURCE.

•When you deal with MySql in your PHP application, you give your application more features, such as full dynamic editing, ability to manage, add, update, delete, and more.

•Save important information, and access it at any time.

Example on db table:

•A table called employee might look like this:

image

Basic Data Types In MySql:

•Each column in a table should has a type, that specifies the type of contents inside it.

•Type determines the storage space for each data, of course data representation for char differs from integer differs from floats differs from strings differs from texts.

•At our PHP tutorial, am going to demonstrate data types that we’ll use most often in our applications, and you can refer for complete reference for all data types supported in MySql db at their official site: www.mysql.com

•int: integer, used when dealing with integer values.

•float: float, used when dealing with float values.

•double: used when dealing with double values.

•bool: used when dealing with zero-one decisions.

•varchar: used for single character and array of characters.

•text: used for text.

•longtext: used for long texts.

•date: used for date records, it’s format: yyyy-mm-dd.

•time: used for time records, it’s format: hh:mm:ss

To download this lesson click here: PHP Tutorial–Lesson 4: Introduction to PHP- Part I

Comments

Popular posts from this blog

PHP Tutorial–Guest Book–System Definition and Requirements

In this lesson I’m going to illustrate the system definition and requirements for the Guest Book application. It is an important step in developing any application, since this step gives us an orientation about the system and its functionality, what is expected from the system to do. actually the system definition comes from keywords from customers and end users, usually try to make it clear for what they need in the application, and what they expect the system to do.  As developers it is our role to define the requirements for the system to be developed. In our example the system definition for the Guest Book is: A system that allows visitors of the site to post their comments and feedbacks about the site, with the possibility for managing comments and maintain it easily and user friendly. On the other hand, the system requirements are: a web server, since it is clear that the developed system is going to run on the Internet, so it is a web-based application not windows-based.

تعلم تطوير تطبيقات للموبايل باستخدام الأندرويد

مرحبا أصدقائي يسعدني أن أبدأ معكم سلسلة حلقات في تعلم تطوير تطبيقات للموبايل باستخدام الأندرويد ، وسأسعى جاهدا معكم في أن تكون هذه السلسلة من أوائل السلسلات في اللغة العربية لتعليم برمجة تطبيقات الأندرويد من البداية وحتى الاحتراف. وسأحاول قدر المستطاع الشرح بلغة عربية بسيطة ومفهومة. حيث ستكون غدا إن شاء الله الحلقة الأولى من تعلم تطوير تطبيقات الموبايل باستخدام الأندرويد. أنس الجاغوب Twitter: @anasjaghoub Facebook: anasjaghoub

Web Development Best Practices (PHP Best Practices)

Websites development is one of the most challenging projects ever to develop, according to the large number of components you deal with, integrate, and manage in your application. For example, most web projects Deal with databases as their data source, and I ntegrate with external services called web services and APIs. As well the application M anages its own objects and components from views to models to controllers to plugins and so on. A skilled web developer should have a great/deep knowledge in most of components used in his system, and as well should ha ve intensive focus on how each component work and how can be used, what can be done, and what cannot. On the other hand, the huge amount of requirements, components to manage, and time frame given to you to accomplish your mission, and number of people in your team, all these factors together requires from you to organize your tasks, and priorities your requirements, do deep analysis and planning in order to have a hi