PHP Classes

File: demos/demo4.php

Recommend this page to a friend!
  Classes of Giovanni Ramos   PDO4You   demos/demo4.php   Download  
File: demos/demo4.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PDO4You
Access SQL databases using the PDO extension
Author: By
Last change: Update of demos/demo4.php
Date: 6 months ago
Size: 441 bytes
 

Contents

Class file image Download
<?php
// Loading demo class
require 'DemoCRUD.php';

// Example with text from HTML Editor
echo '<h2><a href=".">DEMOS</a> &rsaquo; HTML EDITOR</h2>';

// Creating an instance
$demo = new DemoCRUD;

// Sample text
$sample_text = '<p style="color: #CBF;">Lorem ipsum "dolor" sit amet</p>';

// Escape double quotes
$sample_text = addslashes($sample_text);

// UPDATE books SET description = ? WHERE id = 1
$demo->updateWhere($sample_text, 1);