Location: PHPKode > projects > CoreAsset > coreasset/lib/db_handle_old.php
<?php
class Database
{

 function get_from_database($q)
 {
  $query  = $q;
  //echo $query;
  $result = mysql_query($query);
  $rw     = mysql_fetch_array($result);
  return ($rw);
 }

 function Execute($q)
 {
  $query  = $q;
  //echo "Execute :".$q."<br>";
  $result = mysql_query($query);
  $count=mysql_num_rows($result);
  //echo "count=";echo $count;
  //print_r($result);
  return ($result);
 
 }

 function no_of_rows($q)
 {
  $query  = $q;
  $query;
  $result = mysql_query($query);
  $no     = mysql_num_rows($result);
  return ($no);
 }

 function update($q)
 {
  $query  = $q;
 //echo "update :".$q."<br>";
  if(mysql_query($query))
  {
    return (1);
  }
 }

 function insert($q)
 {
  $query  = $q;
 // echo "Insert :".$q."<br>";
  if(mysql_query($query))
  { 
    return (mysql_insert_id());
  }
 }

 function delet($q)
 {
  $query  = $q;
  if(mysql_query($query))
  {
    return (1);
  }
 }
}

$database = new Database();
?>
Return current item: CoreAsset