Php-Mysql-Api a powerful plug-n-play Php api for Mysql database tested with codeception

Hi everyone,

This is my last php project and I want to share it with all of you.
It is a simple but powerful object that gives you a php api for mysql database.

With php-mysql-api, you will be able in 60 seconds chrono, to:
– Access your database datas with a RESTful syntax
– Limit access to specific ips
– POST, GET, PUT and DELETE datas.

It is fully tested with CodeCeption.

The repository is here: https://github.com/edouardkombo/php-mysql-api

I really hope it will save you a lot of time.

Php-Mysql-Api a powerful plug-n-play Php api for Mysql database tested with codeception

Cannot delete or update a parent row: a foreign key constraint fails

If you have encountered this error, this is maybe because:

  1. There is a table within another schema (“database” in mysql terminology) which has a FK reference
  2. The innodb internal data dictionary is out of sync with the mysql one.

To apply your queries, simply bypass foreign keys security check.
This is the solution:

SET FOREIGN_KEY_CHECKS=0;
YOUR_QUERY here

After your queries have been done, reset to default foreign keys security check:

SET FOREIGN_KEY_CHECKS=1;

You’re done.

Cannot delete or update a parent row: a foreign key constraint fails