0% found this document useful (0 votes)
43 views

How Web Database Architecture Works

The document discusses how web databases work and how to query databases from PHP. It explains the steps to query a database which include connecting to the database, selecting a database, sending a query, retrieving results, and closing the connection.

Uploaded by

Micheal Getachew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

How Web Database Architecture Works

The document discusses how web databases work and how to query databases from PHP. It explains the steps to query a database which include connecting to the database, selecting a database, sending a query, retrieving results, and closing the connection.

Uploaded by

Micheal Getachew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

How web database architecture works

Querying a database from web from


1 check and filter data coming from the user
2 set up a connection to db
3
4
5

Querying a database from php


1. Create connection
2. Select a database to use
3. Send query to the database
4. Retrieve the the result of the query
5. Close the connection

MYSQLI
1 creating connection

Procedural way

$conn= mysqli_connect (“severName”,”username”,”Password” );

Object oriented way


$conn=new
mysqli_connect (“severName”,”username”,”Password” );

2 select database

4th paramerter on connection or


use mysqli_select_db (conn,db);
3 Query database

Mysqli_query(conn,query);

4 close

$conn-> close;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy