






































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Internet programming courses by yetbarekworku
Typology: Slides
1 / 46
This page cannot be seen from the preview
Don't miss anything!







































One of the reasons for PHPās popularity as a Web scripting language is its (cross-platform, compatible, scalability, Allows for various DBs ā¦. etc) Allows for various DB formats (Microsoft SQL Server, IBM DB2, PostgreSQL, MySQL, and Oracle. ) Makes it easy for Web developers to create Web applications quickly and efficiently.
Database: is a separate application that stores a collection of data. Table: is a set of rows and columns. It represents a single concept such as products. Column: a set of data of single data type. Ex. FirstName, LastName, Row: single record of data. Ex. āAbebeā, āKebedeā, Field: is the intersection of a row and a column. Ex. FirstName: ā Abebeā Redundancy: Storing data twice, redundantly to make the system
new_link Optional - If a second call is made to mysqli_connect() with the same arguments, no new connection will be established; instead, the identifier of the already opened connection will be returned. client_flags Optional - A combination of the following constants: MYSQL_CLIENT_SSL - Use SSL encryption MYSQL_CLIENT_COMPRESS - Use compression protocol MYSQL_CLIENT_IGNORE_SPACE - Allow space after function names MYSQL_CLIENT_INTERACTIVE - Allow interactive timeout seconds of inactivity before closing the connection
Databaseconnection.php
You can disconnect from MySQL database anytime using another PHP function mysqli_close(). This function takes a single parameter which is a connection returned by mysqli_connect() function. Syntax:
This function returns true if it closes connection successfully otherwise it returns false.
After establishing a MySQL connection with the code above, you then need to choose which database you will be using with this connection. If the database you are looking to work on is not available, you can create it using mysqli_query() or mysql_query() function together with CREATE command followed by database name.
success or FALSE on failure. The parameters are:- sqli and connection.
The syntax of the function is:-
To create a database uses the following sql syntax:
create a database called test.