Location: PHPKode > scripts > Cyber MySQL > example.php
<?

$example = new SQLConnect();

//Variables

 $example->getRows(); //return quantity of rows
 $example->$result; // return result of mysql query (return int)




// basic query

$ex = $example->Query("SELECT field1, field2, field3 FROM table"); 

?>

<? do{ ?>
	
 echo $ex['field1'];

<? }while($exe = mysql_fetch_assoc($example->result)); ?>





<? //basic insert

	
$fields = array('field1', 'field2', 'field3');
$content = array("name" , "surname", "age");


if($example->SQLInsert("table", $fields, $content){
		
echo "Sucess";
}else{
	
 echo "Error on insert";

}

 ?>


<? // UPDATE 

if($example->SQLUpdate("table", "field1", "name", "field2", "surname")){

echo "sucess";

}else{

echo "error:"

}


?>




<?  //DELETE

 if($example->SQLDelete("table" "field1" "name")){
	
  echo "sucess";
}else{
 
  echo "error";	
  
}

?>
Return current item: Cyber MySQL