SSL security technology helps to improve the safety of Internet communications.
SSL is a standard for encrypted client/server communication between network devices.
A network protocol, SSL runs on top of TCP/IP. </li></ul>
CONFIGURATION Instead of using a point-and-click graphic user interface (GUI) or Windows Registry keys as most other modern software packages, Apache generally relies on simple text files for its configuration settings.
CONFIGURING FILES <ul><li>It uses a system text files for managing its configuration data.
These files appear in Apache's ./conf directory and are designed to be edited by system administrators:
It is fast comparing to other Database system such as PostgreSQL,mSQL.
It is light weight yet offers a rich and highly useful function set.
It is supported well by users community. </li></ul>
BASIC QUERIES <ul><li>CREATE Command - is used to create a database/table.
SELECT Command - is used to retrieve data from the database.
DELETE Command - is used to delete data from the database. </li></ul>
BASIC QUERY COMMANDS IN MySQL continue.. <ul><li>INSERT Command - is used to insert data into a database.
UPDATE Command - is used to update the data in a table.
DROP Command - is used to delete or drop the database/table. </li></ul>
SYNTAX FOR QUERY COMMANDS 1. CREATE Command : The Create command is used to create a table by specifying the tablename, fieldnames and constraints as shown below: Syntax: $createSQL=("CREATE TABLE tblName");
2. SELECT Command : It is used to select the records from a table using its field names, '*' is used to select all the fields in a table. Syntax: $selectSQL=("SELECT field_names FROM tablename");
3 .DELETE Command : The Delete command is used to delete the records from a table using conditions as shown below: Syntax: $deleteSQL=("DELETE * FROM tablename WHERE condition");
4. INSERT Command : The Insert command is used to insert records into a table. The values are assigned to the field names as shown below: Syntax: $insertSQL=("INSERT INTO tblname(fieldname1,fieldname2..) VALUES(value1,value2,...) ");
5. UPDATE Command : It is used to update the field values using conditions. This is done using 'SET' and the fieldnames to assign new values to them. Syntax: $updateSQL=("UPDATE Tblname SET (fieldname1=value1,fieldname2=value2,...) WHERE fldstudid=IdNumber");
6. DROP Command: The Drop command is used to delete all the records in a table using the table name as shown below: Syntax: $dropSQL=("DROP tblName");
Returns the current date in the time zone set for the DB session. </li></ul>
EXTRACT : Extracts the specified date field from the supplied date. LAST_DAY : Returns of supplied date with the day shifted to the last day of the month.
PROCEDURES AND FUNCTIONS <ul>Subroutines and functions can be made available to a single program or many; and that, of course, is what stored procedures and stored functions are - they are procedures (or subroutines) and functions stored in the database . </ul>
WHY USE PROCEDURES AND FUNCTIONS? The real advantage to using stored procedures and stored functions is that they provide functionality which is platform and application independant.
WHY USE PROCEDURES & FUNCTIONS? continue.. For example, a team of developers may provide: a Visual Basic application on Windows <ul><li>a Gambas application on Linux
a PHP application on a web server </li></ul>With procedures and functions the functionality only has to be developed once.
CREATING MySQL PROCEDURES A stored procedure is the same as a subroutine in that it cannot directly return a result, however it can receive variables that can be modified by the procedure.
<ul>These variables are defined as: <li>in - the variable can only be used as an input to the procedure.
out - the variable can only be used as an output from the procedure.
inout - this is both an input to, and an output from, the procedure. </li></ul>
Procedures are always declared as: <ul>Define the procedure name, inputs and outputs,body of the procedure. For example: delimiter // </ul>create procedure circle_area (in r double, out a double) begin set a = r * r * pi(); end //delimiter ;
RUNNING MySQL PROCEDURES <ul><li>A MySQL stored procedure is run by using the call method:
In this example 1520.5308443375 would be displayed on the screen. </li></ul>
CREATING MYSQL FUNCTIONS Unlike stored procedures stored functions always return a result, they will also be one of two types : <ul><li>not deterministic - may produce different results for the same inputs .
deterministic - will always produce the same result for any given inputs </li></ul>
<ul>Like procedures, all functions are created : <li>define the function name,
For example : delimiter // create function circumference (r double) returns double deterministic begin declare c double; set c = 2 * r * pi(); return c; end // delimiter ;
RUNNING MySQL FUNCTIONS Unlike stored procedures stored functions are used as part of a select statement: <ul><li>select circumference(22);
In this case (for anyone that's interested) the result would be 138.23007675795 . </li></ul>
IMPORT A MySQL DATABASE <ul><li>This to restore data from a backup or to import from another MySQL server.
Start by uploading the FILE.sql file to the server where we will be running this command. </li></ul># mysql -u username -ppassword database_name < FILE.sql
EXPORT A MySQL DATABASE <ul><li>Replace username, password and database_name with your MySQL username, password and database name.File FILE.sql now holds a backup of your database, download it to your computer.
DISADVANTAGES <ul><li>Security flaws due to unknown vulnerabilities .
Not good to create desktop Applications. </li></ul>
WHY WE ARE USING PHP? <ul><li>It enables programmers to create applications that will run on just about any computer, regardless of operating system.
If the computer can run web server software, the PHP application is portable across operating systems and environments ... PC, Mac, Linux, Windows, Internet, Intranet, etc. </li></ul>
BASIC PHP SYNTAX <ul>* A PHP scripting block always starts with <?php ends with ?> * For maximum compatibility, it is recommended that to use the standard form (<?php) rather than the shorthand form. </ul>
<ul><ul><li>Each code line must end with a semicolon.
There are two basic statements to output text with PHP:
If the file has a .html extension, the PHP code will not be executed. </li></ul></ul>
PHP . ini <ul><li>It is a configuration file that is used to customize behavior of PHP at runtime.
The Settings in which upload directory, register global variables, display errors, log errors, max uploading size setting, maximum time to execute a script and other configurations is written in this file. </li></ul>
PHP .ini continue.. <ul><ul><li>The configuration file ( php.ini ) is read when PHP starts up.
In order for PHP to read it, it must be named 'php.ini' .
The php.ini directives allows us to set configure our PHP setup. </li></ul></ul>
<ul>The parse_ini_file() function parses a configuration ( ini ) file and returns the settings in it in an array. Syntax : parse_ini_file(file,process_sections) <li>file- Required. Specifies the ini file to check.
process_sections -Optional.Default is FALSE. </li></ul>
<ul><li>The following reserved words must not be used as keys for ini files: