PHP REST API Tutorial (Step By Step) 7 - Create Record Part 2

preview_player
Показать описание
Welcome to the first video on Creating a simple REST API in PHP From Scratch. In this video series we will see Create and Consume Simple REST API in PHP. In this video we will see Reading records from database. Tutorial to add create feature to the PHP REST API

What is REST ? What is a REST API ?
REST is an architectural style which is based on web-standards and
the HTTP protocol. This style was initially described by Roy Fielding in 2000. Roy Fielding was also One of the principal authors of the HTTP specification. REST stands for REpresentational State Transfer.
The architectural style of the web.
So what does that even mean??
REST is a set of design criteria and not the physical structure (architecture) of the system REST is not tied to the ‘Web’ i.e. doesn’t depend on the mechanics of HTTP ‘Web’ applications are the most prevalent – hence RESTful architectures run off of it.
Representational State Transfer refers to transferring "representations". You are using a "representation" of a resource to
transfer resource state which lives on the server into application state on the client.

#ProgrammingKnowledge #PHPREST #MySQL
★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

Just want to ask. What if the create includes a file uploads

BadPAPI-
Автор

How did you link category_name in to the post table

real_alkebulan
Автор

if you experiencing this error:

Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'title...

You may want to check the SPACE before and after INTO & SET
az in (NOTICE THE SPACES BEFORE AND AFTER THE 2nd and 3rd APOSTROPHES)

$query = 'INSERT INTO ' . $this->table . ' SET title = :title, ...


Just took an Hour+ trying to pinpoint a bug! Turns out this was it!

seddyverse
visit shbcf.ru