PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Radek Piekarz  >  Simple MySQL Class  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example file
Class: Simple MySQL Class
Simple MySQL database access wrapper
Author: By
Last change:
Date: 16 years ago
Size: 717 bytes


Class file image Download
#connecting to mysql server
$dbc = new dbconnect('localhost', 'root', 'password', 'database', __FILE__, __LINE__);

#using imple query and fetch_array method
$query = "SELECT field, field2 FROM table;";
$result = $dbc->query($pyt ,__FILE__, __LINE__);
while (
$record = $result->fetch_array())

#using numr_rows()method
echo $result->num_rows();

#using query_bool method
if($dbc->query_bool("SELECT field, field2 FROM table;", __FILE__, __LINE__))

#using first_cell method
echo $result->first_cell();

#changinh database
$dbc->change_base('database2', __FILE__, __LINE__);


For more information send a message to info at phpclasses dot org.