https://github.com/jakbin/php_pdo_rest_api
Api using Php Pdo
https://github.com/jakbin/php_pdo_rest_api
mysql php php-api-server php-pdo rest-api sql
Last synced: 2 months ago
JSON representation
Api using Php Pdo
- Host: GitHub
- URL: https://github.com/jakbin/php_pdo_rest_api
- Owner: jakbin
- Created: 2021-08-10T08:59:32.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-23T07:01:33.000Z (almost 3 years ago)
- Last Synced: 2025-01-26T16:15:27.495Z (4 months ago)
- Topics: mysql, php, php-api-server, php-pdo, rest-api, sql
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Php Pdo rest api



## This is only example, You need to modify for your own use.
1. Clone the repo
```bash
git clone https://github.com/jakbin/php_pdo_rest_api.git
```2. Then create database.
create a database name with "api".
```sql
create database api;
``````sql
CREATE TABLE `apiTest`.`api` ( `id` INT NOT NULL AUTO_INCREMENT ,
`fname` TEXT NOT NULL ,
`lname` TEXT NOT NULL ,
PRIMARY KEY (`id`)) ENGINE = InnoDB;
```Or
import "apiTest.sql" file into your database.
4. Start mysql server.
3. Start api server.
s
```bash
php -S 127.0.0.1:8080 -t php_pdo_pdo_api/
```