The document provides an outline of key concepts for database programming with MySQL. It discusses MySQL data types, the data definition language (DDL) for defining databases and tables, the data manipulation language (DML) for querying and manipulating data using SQL statements like SELECT, INSERT, UPDATE, DELETE. It also covers MySQL clauses like WHERE, ORDER BY, LIMIT, and joins for retrieving data from multiple tables. The document demonstrates how to connect to and query a MySQL database using PHP with examples of prepared statements. It proposes a course project and assignment to apply the concepts by building a basic application.
Correctly understanding the eight data types in PHP is essential to a solid foundation in development. Come refresh your knowledge of the scalar types, compound types, and special data types used in PHP, and learn about proper usage of each. Review type juggling, learn some common data type traps to avoid, and how to code defensively to prevent having the data type of a variable change unexpectedly. Finally learn how unit tests can help verify that code is handling data types correctly.
Correctly understanding the eight data types in PHP is essential to a solid foundation in development. Come refresh your knowledge of the scalar types, compound types, and special data types used in PHP, and learn about proper usage of each. Review type juggling, learn some common data type traps to avoid, and how to code defensively to prevent having the data type of a variable change unexpectedly. Finally learn how unit tests can help verify that code is handling data types correctly.
All variables in PHP start with a $ (dollar) sign followed by the name of the variable.
A valid variable name starts with a letter (A-Z, a-z) or underscore (_), followed by any number of letters, numbers, or underscores.
If a variable name is more than one word, it can be separated with underscore (for example $employee_code instead of $employeecode).
'$' is a special variable that can not be assigned.
This note describes the core language constructs of JavaScript.
- JS variable declarations and hoisting
- JS function declarations and hoisting
- JS objects
- JS strings, arrays, numbers
- JS control flow and loop statements
All variables in PHP start with a $ (dollar) sign followed by the name of the variable.
A valid variable name starts with a letter (A-Z, a-z) or underscore (_), followed by any number of letters, numbers, or underscores.
If a variable name is more than one word, it can be separated with underscore (for example $employee_code instead of $employeecode).
'$' is a special variable that can not be assigned.
This note describes the core language constructs of JavaScript.
- JS variable declarations and hoisting
- JS function declarations and hoisting
- JS objects
- JS strings, arrays, numbers
- JS control flow and loop statements
Presentation showing that writing tests is not really hard with examples on testing a simple class, testing with dataproviders, fixtures, mocks, stubs, databases and how to use zend framework bootstrap for MVC testing.
Given at php|tek 09 unconf sessions.
ABOUT PHP COURSE SCOPE:
The booming IT business across the globe, the web has become one in every of the foremost necessary suggests that of communication nowadays and websites are the lifelines of the web.
Thus career scope in internet planning is tremendous and career opportunities are sensible. With the inevitable want of websites for any institute or company, they hunt for efficient web designers and web developers, who will produce skilled websites, is ever compelling.
These professionals are needed in each field of business from giant companies to instructional institutes, to little business to private uses.
This program is developed to provide students with the information they need to develop and implement effective and powerful websites sites.
PROGRAM EDGES
Design, implement, publish, and maintain websites, using authoring or scripting languages, content creation tools, management tools and digital media.
Perceive the way to clearly organize a standardized and purposeful web site from each a user and business perspective.
Value code to confirm that it's valid, is correctly structured, meets business standards and is compatible with browsers, devices or in operation systems.
Develop or validate take a look at routines and schedules to confirm that take a look at cases mimic external interfaces and address all browser and device varieties. Construct, extract, transform, and gift information resident content directly into an internet delivery mechanism.
Hello people this is first time in the history when somebody has take a pain to create such a large ppt it is almost my 5 months laborious work..
although i know ppt cannot b more than 30 slides but at the same time i dont want my readers to to feel the lack of knowledge
THIS PPT BELONGS TO TECHNICALS PERSONS hope u like it thanking you ........
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
2. Outline
• MySQL
• How it works
• Data Types
• Data Definition Language
• Data Manipulation Language
• MySQL Comments
• Where clause
• Comparison Operators
• ORDER Clause
• LIMIT Clause
• Escaping Characters
• MySQL Joins
• Using MySQL in PHP
• Methods to use
• Connecting to a database
• Querying a database
• Exercise
• Exercise Solution
• Prepared Statements
• Tips and Tricks
• Resources
• Course Project
• Assignment
3. MySQL
MySQL is a Relational Database Management System
(RDBMS) which stores data in a structured way ( in tables ).
It allows for retrieving data using Structured Query Language
(SQL).
MySQL Server
Web Server
( Apache with PHP )
Web Browser
Request
Query
Resultset
Response
4. How it works
How tables look like ?
id name salary job_title
1 Ahmed 100 Developer
2 Mohamed 200 Doctor
3 Sara 300 Engineer
4 Marwa 400 Designer
5. How it works
• In MySQL, we can have multiple databases, every
database has an unlimited amount of tables.
• A table holds data about some entity ( person, employee,
etc ).
• The table consists of number of columns, each column
can have a data type ( char, int, float, etc… )
6. Data Types
Size Name Range Example
1 TINYINT
-128 TO 127
[0 to 255 if UNSIGNED]
10
2 SMALLINT
-32,768 to 32,767
[0 to 65,535]
30000
3 MEDIUMINT
-8,388,608 to 8,388,607
[0 to 16,777,215]
8000000
4 INT
-/+2.147E+9
[0 to 4.294E+9]
80000000
8 BIGINT
-/+9.223E+18
[0 to 18.45E+18]
80000000000
4 FLOAT p=0-24 4.333333
8 DOUBLE
Min=+/-2.225E-308
Max=+/-1.798E+308
.000000000000000000
003
arbitrary
DECIMAL[(M,[D])]
Stored as string
Max Range = DOUBLE range33333.4444
M CHAR(M)
M=0-255 Characters, FIXED.
Right padded with spaces.
Hello There
M VARCHAR(M)
M=0-65,535 Characters
M=0-255 <v5.0.3
Hello There
7. Data Types
Size Name Range Example
arbitrary TINYTEXT 0-255 Characters Hello There
arbitrary TEXT 0-65,535 Char's Hello There
arbitrary MEDIUMTEXT 0-16,777,215 Char's Hello There
arbitrary LONGTEXT 0-4,294,967,295 Char's Hello There
arbitrary BINARY[(M)] M=0-255 bytes, FIXED.
arbitrary VARBINARY(M)
0-65,535 bytes
M=0-255 <v5.0.3
arbitrary TINYBLOB 0-255 bytes
arbitrary BLOB 0-65,535 bytes
arbitrary MEDIUMBLOB 0-16,777,215 bytes
arbitrary LONGBLOB 0-4,294,967,295 bytes
3 DATE
"1000-01-01" - "9999-12-
31"
2010-01-01
8 DATETIME
"1000-01-01 00:00:00" -
"9999-12-31 23:59:59"
2010-01-01 10:12:01
3 TIME "-838:59:59" - "838:59:59" 10:12:01
4 TIMESTAMP
19700101000000 -
2037+
19700101000000
8. Data Definition Language
DDL in the language MySQL use to define its data structures (
databases and tables ).
Example :
CREATE TABLE employees (
id INT PRIMARY KEY,
first_name CHAR(50) NULL,
last_name CHAR(75) NOT NULL,
salary INT NOT NULL DEFAULT 0,
dateofbirth DATE NULL
);
9. Data Definition Language
Altering tables:
Adding or removing columns or changing the data types of
columns.
Examples:
ALTER TABLE employees ADD salary INT(11);
ALTER TABLE employees MODIFY salary FLOAT(10,5);
ALTER TABLE employees DROP salary;
11. Data Manipulation Language
DML is the language used by MySQL to manipulate data (
select, insert, update, delete )
SELECT statement:
It is used to get data from a table.
Example :
SELECT * FROM employees
The previous statement should select all the data from the employees
table.
SELECT first_name FROM employees
This should return the column “first_name”
12. Data Manipulation Language
INSERT statements
They are used to insert a new row into a table.
Examples:
INSERT INTO employees SET id=1, first_name='John',
last_name='Steve', dateofbirth = '1970-01-01‘
INSERT INTO employees (id, first_name, last_name,
dateofbirth ) values ( '2', ‘John', 'Steve', '1970-01-01' )
13. Data Manipulation Language
UPDATE statements
These statements are used to update (change) data.
Example:
UPDATE employees SET first_name = ‘Mohamed’
This will update all the rows in the employees table setting
the “first_name” to “Mohamed”
14. Data Manipulation Language
DELETE statements
These statements are used delete rows from a table.
Example:
DELETE FROM employees;
This will delete all rows from employees table.
15. MySQL Comments
Just like any other programming language, MySQL has ways
to comment code.
1. -- one line comment
2. # one line comment
3. /*
Multi
Line
Comment
*/
16. Where clause
Where clauses are used to restrict the operations to a limited
number of rows (the rows the satisfy this condition).
Examples:
SELECT * FROM employees WHERE first_name = ‘Mohamed’
DELETE FROM employees WHERE first_name = ‘John’
Update employees SET first_name = ‘Mohamed’ WHERE
last_name = ‘Ahmed’
17. Comparison Operators
Operator Description
= Equals
!= Not Equals
<> Not Equals
>= Greater than or equal
<= Less than or equal
IS NULL True if the field is not null, false otherwise
IS NOT NULL True if the field is null, false otherwise
BETWEEN … AND … Checks if the value is between the specified numbers
NOT BETWEEN … AND … Checks if the value is not between the specified numbers
IN ( …, …, …, ) Checks if the value is in the specified list
NOT IN Checks if the value is not in the specified list
LIKE Checks if the value is like the specified string.
NOT LIKE Checks if the value is not like the specified string. See next slide
18. Comparison Operators Examples
SELECT * FROM employees WHERE salary <= 20
SELECT * FROM employees WHERE salary BETWEEN 10 AND
20
SELECT first_name FROM employees WHERE last_name LIKE
‘%ham%’ # percentage ‘%’ matches zero or more characters
SELECT * FROM employees WHERE first_name NOT LIKE
‘__ham__’ # underscore matches 1 character
SELECT * FROM employees WHERE salary IN ( 10, 20, 30 )
19. ORDER Clause
ORDER clauses are used to order the result set.
Examples:
SELECT * FROM employees ORDER BY first_name ASC
# ASC = ascendingly
SELECT * FROM employees ORDER BY last_name DESC
# DESC = descendingly
20. LIMIT Clause
Limit clauses are used to limit the number of rows in a result
set.
Examples:
SELECT * FROM employees LIMIT 1
# gets only the first row
SELECT * FROM employees LIMIT 1 , 2
# gets 2 rows starting from the first row ( it gets the second
and third rows )
21. Escaping Characters
MySQL is similar to PHP when escaping characters :
SELECT * FROM employees WHERE first_name = ‘That’s me’
SELECT * FROM employees WHERE first_name = “That”s
me”
But it adds another method of escaping :
SELECT * FROM employees WHERE first_name = ‘That’’s me’
SELECT * FROM employees WHERE first_name = “That””s
me”
22. MySQL Joins
MySQL joins allow us to get data from multiple tables in the
same query. Suppose we have the following tables:
id name salary job_title
1 Ahmed 100 Developer
2 Mohamed 200 Doctor
3 Sara 300 Engineer
4 Marwa 400 Designer
id model CC employee_id
1 BMW 1600 1
2 Hyundai 1600 2
3 Honda 1800 3
4 Fiat 1600 4
Employees table
Cars Table
23. MySQL Joins
The previous tables are employees and cars tables. Every car
has an owner which is an employee.
If we need to get data from these 2 tables, we will need to
join them like the following :
SELECT employees.name, cars.model FROM employees, cars
WHERE employee.id = cars.id
name model
Ahmed BMW
Mohamed Hyundai
Sara Honda
Marwa Fiat
Result set
24. Using MySQL in PHP
To achieve dynamism, a connection between a language and
database is essential.
PHP has a great MySQL support. There are various methods/
approaches that we could use to connect to MySQL in PHP.
25. Methods to use
We have 3 methods of code styles that we can use to
connect to MySQL in PHP.
1- Procedural approach.
2- MySQLi approach.
3- PDO ( PHP Data Objects ) approach.
We Will user PDO because it is OOP and it supports named
parameters and exceptions plus it has a good abstraction
model that supports many drivers.
27. Querying a database
Here we will need to display the last name of the people
with first_name = ‘Mohamed’.
<?php
$sql = "SELECT * FROM employees WHERE first_name =
'Mohamed'";
$result = $connection->query($sql);
foreach ($result as $row) {
print $row['last_name'] . "<br/>";
}
?>
28. Querying a database
Inserting a new row into employees table :
<?php
$sql = “INSERT INTO employees SET first_name = ‘Ahmed’,
last_name = ‘Gamal’, salary = 300";
$connection->query($sql);
?>
29. Querying a database
Getting the number of rows in the result set:
<?php
$sql = "SELECT * FROM employees WHERE first_name =
'Mohamed'";
$result = $connection->query($sql);
echo “Number of rows : “ . $result->rowCount();
?>
30. Exercise
Write a PHP application the inserts a new employee into the
‘employees’ table. There should be a form that looks like the
following wireframe :
31. Exercise Solution
We will have a script named “form.php” with the following
HTML:
<html>
<body>
<form action="add.php" method="post" >
<ul style="list-style-type: none;">
<li><label for="first_name">First name</label>
<input type="text" name="first_name" id="first_name" />
</li>
<li><label for="last_name">Last name</label>
<input type="text" name="last_name" id="last_name" />
</li>
<li><label for="salary">Salary</label>
<input type="text" name="salary" id="salary" />
</li>
<li><label for="dateofbirth">Date of birth</label>
<input type="text" name="dateofbirth" id="dateofbirth" />
</li>
<li><input type="submit" name="submit" value="submit" /></li>
</ul>
</form>
</body>
</html>
32. Exercise Solution
The other script is called “add.php” which contains :
<?php
$dsn = 'mysql:dbname=testdb;host=127.0.0.1';
$user = 'dbuser';
$password = 'dbpass';
try {
$connection = new PDO($dsn, $user, $password);
$sql = "INSERT INTO employees SET first_name = '" . $connection->quote($_POST['first_name']) . "',
last_name = '" . $connection->quote($_POST['last_name']) . "', salary = " . $connection->quote($_POST['salary'])
. ", dateofbirth = '" . $connection->quote($_POST['dateofbirth']) . "'";
$connection->query($sql);
echo "Record has been added.";
} catch (PDOException $e) {
echo 'Connection failed: ' . $e->getMessage();
}
?>
33. Escaping values passed to MySQL
It is advised that any values sent to MySQL should be
escaped using the function called “quote” (like the previous
example). In addition to preventing syntax errors in SQL
statements, it is a top security concern ( google “SQL
injection”, for more information about this type of security
issue).
PDO::quote($str);
34. Prepared statements
Prepared statements are the ability to set up a statement
once, and then execute it many times with different
parameters.
Example :
SELECT * FROM employees WHERE first_name = ?
SELECT * FROM employees WHERE first_name = :first_name
35. Prepared statements
One of the key advantages of prepared statements is the
ability to bind parameters.
Binding parameters can be done using one of the
approaches:
1- The question marks “?”.
2- Named parameters ( e.g. “:first_name”, “:last_name”, etc).
38. Prepared statements
Why to use prepared statements:
1- Security; as the developer is not responsible for escaping
parameters passed to MySQL.
2- MySQL parses each query before executing it, so if we are
going to execute the same query with different data values,
prepared statements are the optimized solution since the
query will be compiled ( prepared ) only one time, and then
the data will be substituted in the query each time we
execute it.
41. Assignment
Using the employees table, write a PHP code snippet that
does the following:
1- Shows all the entries in the table.
2- Deletes an entry.
3- Edits an entry.
4- Adds a new entry.
The resulting application should look like PHPMyAdmin
interface.