table = $tName; $this->title = $tiName; $this->imggroup = $iGroup; $this->text = $txtName; if($ivalue != ""){ $this->id = $ivalue; } if($dDate != ""){ $this->dDate = $dDate; } } function insertData($title, $imggroup, $text, $date=""){ include 'config.php'; include 'functions.php'; $stat = ""; $dbcon = db_con(); $sql = "INSERT INTO " . $dbname . "." . $this->table . " SET " . $this->title . "=\"" . $title . "\", " . $this->imggroup . "=\"" . $imggroup . "\", " . $this->text . "=\"" . $text . "\"" ; if($this->dDate !=""){ if($date !=""){ $sql = $sql . ", " . $this->dDate . "=\"" . $date . "\""; } } $dbact = mysql_query($sql); if(!$dbact){ $stat = "Error with Revo() class inserData
Error: " . mysql_error() ; mysql_close($dbcon); return $stat; } else { $stat = "Inserted data into " . $this-table . " successfully!"; mysql_close($dbcon); return $stat; } } function pullData($id="", $limit="", $field="",$fSorot="",$sBy=""){ include 'config.php'; include 'functions.php'; if($id == "" && $limit == "" && $field == "" && $fSort == "" && $sBy ==""){ $sql = "SELECT * FROM " . $dbname . "." $this->table . " ORDER BY " . $this->id . " DESC"; } if($limit != "" && $field !="" && $fsort != "" ){ 0 } } } ?>