PHP Classes

File: examples/update_delete.php

Recommend this page to a friend!
  Classes of Mohamed Elbahja   MySQLi Manager   examples/update_delete.php   Download  
File: examples/update_delete.php
Role: Example script
Content type: text/plain
Description: Example script
Class: MySQLi Manager
Execute MySQL queries from parameters using MySQLi
Author: By
Last change: Update update_delete.php
Date: 7 years ago
Size: 415 bytes


Class file image Download

require 'db_config.php';

/* Connect DB */

$data = array(

'title' => 'update title',
'description' => 'update desc',
'text' => 'update text'

if (
$db->update('example_table', $data, 'WHERE id=1')) {

// true
echo 'updated';
} else {

// false


if ($db->delete('example_table', 'WHERE id=2')) {

    echo 'deleted';
} else {