{"id":22463829,"url":"https://github.com/davidobinna/-beginners-php-pdo-coding","last_synced_at":"2025-03-27T14:28:49.851Z","repository":{"id":167183247,"uuid":"526414316","full_name":"davidobinna/-BEGINNERS-PHP-PDO-coding","owner":"davidobinna","description":"A simple database querying using pdo extension","archived":false,"fork":false,"pushed_at":"2022-08-19T00:35:36.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T18:43:06.690Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidobinna.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-19T00:34:03.000Z","updated_at":"2022-12-05T19:00:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"57a7781f-aec6-47c3-b1bf-608fa777591f","html_url":"https://github.com/davidobinna/-BEGINNERS-PHP-PDO-coding","commit_stats":null,"previous_names":["davidobinna/-beginners-php-pdo-coding"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2F-BEGINNERS-PHP-PDO-coding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2F-BEGINNERS-PHP-PDO-coding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2F-BEGINNERS-PHP-PDO-coding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidobinna%2F-BEGINNERS-PHP-PDO-coding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidobinna","download_url":"https://codeload.github.com/davidobinna/-BEGINNERS-PHP-PDO-coding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245862363,"owners_count":20684672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T09:14:12.762Z","updated_at":"2025-03-27T14:28:49.839Z","avatar_url":"https://github.com/davidobinna.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#PHP - PDO \nPHP PDO is a database access layer that provides a uniform interface for working with multiple databases.\n\nPDO simplifies the common database operations including:\n\n.Creating database connections\n.Executing queries using prepared statements\n.Calling stored procedures\nPerforming transactions\n.And handling errors\n PDO allows you to work with any database that has a PDO driver available. PDO relies on database-specific drivers, e.g., PDO_MYSQL for MySQL, PDO_PGSQL for PostgreSQL, PDO_OCI for Oracle database, etc., to function properly. Here’s the complete list of PDO drivers.\n\nTherefore, to use PDO for a specific database, you need to have a corresponding database driver available.\n\n#Section 1. PDO Quick Start\nThis section shows you step by step how to connect to some relational database management systems, including MySQL and PostgreSQL.\n\nConnect to MySQL – show you step-by-step on how to connect to the MySQL database.\nConnect to PostgreSQL – show you how to connect to the PostgreSQL database.\n\n#Section 2. Creating a sample database\nCreate a sample database – show you how to create a sample database and tables in the MySQL database server and a reusable script for connecting to the database.\nCreating new tables – learn how to create a new table in a MySQL database from PHP using PDO.\n\n#Section 3. Prepared Statements\nPrepared statement – introduce to you the prepared statement.\nExecute the LIKE operator – show you how to use a prepare statement to execute a query that contains the LIKE operator.\nExecute the IN operator – learn how to use a prepared statement to execute a query that contains the IN operator.\n\n#Section 4. CRUD in PDO\nThis section illustrates the common database operation, including creating (insert), reading(select), updating, and deleting data using PDO. These basic operations are often called CRUD.\n\nInserting data into a table – walk you through the steps of inserting data into a table of a database.\nUpdating data in a table – show you how to update data in a table from PHP using PDO.\nSelecting data from a table – guide you on how to query data from a table.\nDeleting data from a table – show you how to delete data in the database table using PDO API.\n\n#Section 5. Fetching data\nThis section discusses various fetch* methods and modes in detail.\n\nfetch() – fetch a row from a result set associated with a PDOStatement object.\nfetchAll() – fetch all rows from a result set object into an array.\nfetchcolumn() – fetch a single column from the next row in a result set.\nfetchObject() – fetch the next row from a result set and returns it as an object of a class.\nPDO::FETCH_KEY_PAIR – select a two-column result in an array where the first column is the key and the second column is the value\nPDO::FETCH_GROUP – group rows by the unique values of the first column in the result set.\nPDO::FETCH_CLASS – show you how to return an instance of a class whose properties map to the column values from the database.\n\n#Section 6. Calling Stored Procedures (Hidden file)\nThis section shows you some examples of dealing with stored procedures, including:\n\nCalling a MySQL stored procedure from PHP using PDO – show you how to call a MySQL stored procedure from PHP using PDO.\n#Section 6 cntd. Managing Transaction in PDO\nPDO provides you with some handy methods, including beginTransaction(), commit() and rollBack() that handles transactions effectively. This section gives you some examples of handling transactions in your web application.\nPDO Transaction – learn how to perform a database transaction from PHP using PDO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidobinna%2F-beginners-php-pdo-coding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidobinna%2F-beginners-php-pdo-coding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidobinna%2F-beginners-php-pdo-coding/lists"}