1. Go to this page and download the library: Download rusadrako/driver_db library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* Cоздаёт строку в таблице с заданными переменными.
* @param string $table_name Имя таблицы.
* @param array $arr_insert Массив с переменными для добавления.
* @param array $arr_where Условие добавления строки.
* @return array Ответ БД: ID номер новой строки или false.
*/
public function insert($table_name, $arr_insert, $arr_where = []) { ... }
/**
* Возвращает ID последней вставленной строки или значение последовательности
*/
public function insert_id() { ... }
/**
* Функция возвращает возвращает результат запроса в БД.
* @param string $query Строка запроса.
* @param bool $return_error Маркер возврата сообщения об ошибке.
* @return array Ответ БД.
*/
public function query($query) { ... }
/**
* Обновляет строку в таблице масивом переменных по условию.
* @param string $table_name Имя таблицы.
* @param array $arr_update Массив с переменными для обновления.
* @param array $arr_where Условие обработки строк.
* @return bool Ответ БД: true или false.
*/
public function update($table_name, $arr_update, $arr_where) { ... }
/**
* Удаляет строку из таблицы по условию.
* @param string $table_name Имя таблицы.
* @param array $arr_where Условие обработки строк.
* @return bool Ответ БД: true - выполнено; false - не выполнено.
*/
public function delete($table_name, $arr_where) { ... }
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.