Login   Register  
PHP Classes
elePHPant
Icontem

File: Documentation.html

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Fernando Alls  >  Easy DB Work  >  Documentation.html  >  Download  
File: Documentation.html
Role: Documentation
Content type: text/plain
Description: Documentation about EasyDbWork
Class: Easy DB Work
Execute MySQL queries using parameter lists
Author: By
Last change:
Date: 2012-06-18 04:35
Size: 5,688 bytes
 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>:: Easy DB Work ::</title>
<style>
#page-1300{position:relative; width:1300px; height:auto; left:50%; margin-left:-650px; margin-top:20px; border:1px solid #ccc; margin-bottom:40px;}
#page-1200{position:relative; width:1200px; height:580px; left:50%; margin-left:-600px; margin-top:20px; border:1px solid #ccc; margin-bottom:40px;}
#page-1000{position:relative; width:1000px; height:580px; left:50%; margin-left:-500px; margin-top:20px; border:1px solid #ccc; margin-bottom:40px;}
#page-800{ position:relative; width:1000px; height:580px; left:50%; margin-left:-500px; margin-top:20px; border:1px solid #ccc; margin-bottom:40px;}
.box{width:auto;padding-top:30px; border:1px solid #666;}
.float-left{float:left;}
.float-right{float:right;}
.use1300{width:1300px;}
.use1200{width:1200px;}
.use1000{width:1000px;}
.use800{width:1000px;}
.use900{width:900px;}
.use800{width:800px;}
.use700{width:700px;}
.use600{width:600px;}
.use500{width:500px;}
.use400{width:400px;}
.use300{width:300px;}
.use200{width:200px;}
.use100{width:100px;}
.center1300{position:relative; left:50%; margin-left:-750px; padding:10px 10px 10px 10px;}
.center1200{position:relative; left:50%; margin-left:-600px; padding:10px 10px 10px 10px;}
.center1000{position:relative; left:50%; margin-left:-500px; padding:10px 10px 10px 10px;}
.center900{position:relative; left:50%; margin-left:-450px; padding:10px 10px 10px 10px;}
.center800{position:relative; left:50%; margin-left:-400px; padding:10px 10px 10px 10px;}
.center700{position:relative; left:50%; margin-left:-350px; padding:10px 10px 10px 10px;}
.center600{position:relative; left:50%; margin-left:-300px; padding:10px 10px 10px 10px;}
.center500{position:relative; left:50%; margin-left:-250px; padding:10px 10px 10px 10px;}
.center400{position:relative; left:50%; margin-left:-200px; padding:10px 10px 10px 10px;}
.center300{position:relative; left:50%; margin-left:-150px; padding:10px 10px 10px 10px;}
.center200{position:relative; left:50%; margin-left:-100px; padding:10px 10px 10px 10px;}
.center100{position:relative; left:50%; margin-left:-50px; padding:10px 10px 10px 10px;}


/*  Retira bordas */
.no-border{border:0px;}
.no-padding{padding:0px 0px 0px 0px;}


/* labels colors */
.red{color:red}
.black_bg{background:#000; color:white;}
</style>
</head>

<body>
<div id="page-1200" style="height:auto;">
  <div class="box use1200" style="background-color:#666; color:#FFF; padding:10px 0px 10px 0px;">
   <center> <h1> Easy DB Work </h1> </center>
  </div>
  
   <div class="box use1000 center1000" style="margin-top:40px; margin-bottom:40px; background:#FFF;">
    &nbsp;&nbsp;<b>About <i>Easy DB Work</i>:</b><br>
    &nbsp;&nbsp;Easy DB Work is a simple facilitator of access to the database, having written his main usage needs, these needs being the famous crud.<br><br>
 
    &nbsp;&nbsp;<b>Free use:</b><br>
    &nbsp;&nbsp;It is a free module, then you can easily adapt it to your project, improving it, just ask that you keep the rights to develop.<br><br>    


    &nbsp;&nbsp;<b>How to use:</b><br><br>
    &nbsp;&nbsp;<b>getAll([parameter1 Table Name]):</b><br>
    &nbsp;&nbsp;This method return all from db<br><br>
    <div class="box use400 black_bg no-border">
     $objeto->getAll('table_name');
    </div>
    <br><br>

    &nbsp;&nbsp;<b>selectWhere([parameter1 Table Name], [parameter2 array]):</b><br>
    &nbsp;&nbsp; This method selects the database as an array containing the data<br><br>
    <div class="box use400 black_bg no-border">
     $data = array(<br>
       'nome'  => 'Fernando Alves',<br>
       'estado' => 'RS'<br>
     );<br>
     $objeto->selectWhere('table_name', $data);
    </div>
    <br><br>
    
    
    &nbsp;&nbsp;<b>deleteAll([parameter1 Table Name]):</b><br>
    &nbsp;&nbsp; This method performs a truncate table, zeroing out its contents and also putting your self in an increment<br><br>
    <div class="box use400 black_bg no-border">

     $objeto->deleteAll('table_name');
    </div>
    <br><br>    
    
    &nbsp;&nbsp;<b>deleteWhere([parameter1 Table Name], [parameter2 Condition]):</b><br>
    &nbsp;&nbsp; This method deletes the parameter table as the second, a condition.<br><br>
    <div class="box use400 black_bg no-border">

     $objeto->deleteWhere('table_name', 'name = "pedro"');
    </div>
    <br><br>     
    
    
    
    &nbsp;&nbsp;<b>update([parameter1 Table Name], [parameter2 array], [parameter3 condition]):</b><br>
    &nbsp;&nbsp; This method performs an update on an id as your array of data to be received + the condition<br><br>
    <div class="box use400 black_bg no-border">
     $data = array(<br>
       'nome'  => 'Fernando Alves',<br>
       'estado' => 'RS'<br>
     );<br>
     $objeto->update('table_name', $data, 'id = 1');
    </div>
    <br><br>
    
    &nbsp;&nbsp;<b>insert([parameter1 Table Name], [parameter2 array]):</b><br>
    &nbsp;&nbsp; This method inserts the table as the values ​​passed in parameter 2, the array of values<br><br>
    <div class="box use400 black_bg no-border">
     $data = array(<br>
       'id'  => '',<br>
       'nome'  => 'Fernando Alves',<br>
       'email' => 'fernandoguaiba@gmail.com'<br>
     );<br>
     $objeto->insert('table_name', $data);
    </div>
    <br><br>       
    
    
</div>  
</div>
</body>
</html>