Coder Social home page Coder Social logo

dynamic-api-php's Introduction

Dynamic-Api-php

a dynamic api php, mysql with output json (for small project) Give you many services to manage your database (select , search , add , update , remove )

Getting Started

alt tag

Config database

link api with your database

$Config_DB_Host="localhost";  // Database Host
$Config_DB_Name="test";  // Database  name
$Config_DB_User="root";   // Database user name
$Config_DB_Password="root"; // Database user password

Other options

secure your api by Authentication Code

$Config_Required_Auth=FALSE;   //is required Authentication
$Config_Auth_Code="any code";   //Authentication Code

How to use with example

you need to send json template to POST request

get all data in table

This command enables you to retrieve all the rows in the table user

{
  "action": "all",
  "auth": "any code",
  "from": "user"
}

Retrieve records by a particular column value

retrieve records data from table user by column id

{
  "action": "get",
  "auth": "any code",
  "from": "user",
  "key": "id",
  "data": {
    "id": "1",
  }
}

Search records in table

Search records data from table user by column name

{
  "action": "search",
  "auth": "any code",
  "from": "user",
  "key": "name",
  "data": {
    "name": "ali",
  }
}

Insert record in table

add record in table user with values

{
  "action": "add",
  "auth": "any code",
  "from": "user",
  "data": {
    "id": "1",
    "name": "ali",
    "pass": "05980727"
  }
}

Update record in table

record record in table user with a particular column id

{
  "action": "edit",
  "auth": "any code",
  "from": "user",
  "key": "id",
  "data": {
    "id": "1",
    "name": "ali",
    "pass": "05980727"
  }
}

Remove record in table

remove record in table user with a particular column id

{
  "action": "delete",
  "auth": "any code",
  "from": "user",
  "key": "id",
  "data": {
    "id": "1"
  }
}

Development

  • Email - mohammed alimoor

dynamic-api-php's People

Contributors

mohammedalimoor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.