Languages
[Edit]
EN

PHP - how to make MySQL select query with PDO?

6 points
Created by:
Mohammad-Oneal
327

In PHP it is possible to make SQL SELECT query with PDO in following way.

1. SELECT query with PDO example

Edit

Result:

SQL Injection prevention with PDO class - PHP / MySQL.
SQL SELECT query with PDO class - PHP / MySQL.

2. Database preparation

Edit

create_tables.sql file:

insert_data.sql file:

See also

Edit
  1. PHP - how to prevent SQL injection?
  2. PHP - how to make MySQL insert query with PDO?
  3. PHP - how to make MySQL update query with PDO?
  4. PHP - how to make MySQL delete query with PDO?
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

PHP - MySQL

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join