<?php
 
 
/**
 
 
CHANGE DEFINTION OF CONECTION
 
IN method of CLASS --  impliqueQwery(){ }
 
 
USE YOUR DATA TABLE .
 
 
$arrayUpdateData=array (
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value'
 
);
 
 
==================================================================================
 
 
$objectInsertNewData=new insertData();
 
 
$objectInsertNewData->usingData('nameOfTable',$arrayUpdateData);
 
 
==================================================================================
 
 
$objectUpdateDataInRowExist=new insertData();
 
 
$objectUpdateDataInRowExist->('nameOfTable',$arrayUpdateData,'value Of ColumnXXX in this row','ColumnXXX');
 
 
$returnedValue=$objectUpdateDataInRowExist->('nameOfTable',$arrayUpdateData,'value Of ColumnXXX in this row','ColumnXXX','name Of The Column That You Want To Get Value From Same Row');
 
 
==================================================================================
 
 
UPDATE MORE THAN ONE TABLES UNITING ONE WITH ANOTHER
 
 
 
    id          email        andAnother    
 
  |        23    |  [email protected] |         456           |            this id = x_id
 
  -------------------------------------------
 
  |     24    |[email protected] |        978            |
 
  -------------------------------------------
 
  
 
  
 
    id           x_id        andAnother       
 
  |        2    |   23        |       drink           |            this id = y_id
 
  -------------------------------------------
 
  |     3    |    24        |        eat            |
 
  -------------------------------------------
 
      
 
    id          y_id         andAnother       
 
  |     news   |   2        |          color        |
 
  -------------------------------------------            this id = z_id
 
  |    pics |    3        |        sound        |
 
  -------------------------------------------
 
  
 
  
 
    id         z_id             andAnother
 
  |       456     |   news    |          black        |
 
  -------------------------------------------
 
  |    457     |    pics    |        blue        |
 
  -------------------------------------------
 
  
 
  $arrayFor1_Table=array (
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value'
 
);
 
 
$arrayFor2_Table=array (
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value'
 
);
 
 
$arrayFor3_Table=array (
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value'
 
);
 
 
$arrayFor4_Table=array (
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value',
 
    'columnName'='value'
 
);
 
  
 
        $arrayAll_Arrays_Together=array (
 
            $arrayFor1_Table,
 
            $arrayFor2_Table,
 
            $arrayFor3_Table,
 
            $arrayFor4_Table
 
        );  
 
  
 
  
 
          $array_With_Tables_Names(
 
            'nameOf1_Table',
 
            'nameOf2_Table',
 
            'nameOf3_Table',
 
            'nameOf4_Table'
 
          );
 
  
 
  
 
 $objectUpdateDataInRowExist=new insertData();
 
 
$objectUpdateDataInRowExist->(
 
                                $array_With_Tables_Names,
 
                                $arrayAll_Arrays_Together,
 
                                '[email protected] ',
 
                                'email');
 
                                
 
All changed data uniting with '[email protected] ',column email from first table.  
 
 
 
 
==================================================================================
 
 
 
 */
 
 
// require_once ("../conStr.php");
 
require_once ("./class_insertData.php");
 
 
$obj=new insertData();
 
 
$arr=array( 
 
    'id'=>'19',
 
    'event_id' => '7' ,
 
 'hear_from ' => '222 Hello man',
 
 'family_register' => '1');
 
 
 
$v=$obj->usingData("_events_user_survey",$arr,"19","id","hear_from");
 
 
echo ' ok - '.$v;
 
 
$arrNew=array( 
 
    'event_id' => '07' ,
 
     'hear_from ' => 'Best Wishes!',
 
     'family_register' => '1');
 
     
 
$obj->usingData("_events_user_survey",$arrNew);
 
echo '<br> succsesful finish ';
 
?>
 
 |