Ejemplo n.º 1
0
 public function call_dbFunction_without_param($dbFunctionName)
 {
     $this->database = Mysql_Database::getInstance();
     $query = "call {$dbFunctionName}();";
     $result = $this->database->query($query);
     //print_r($result);
     return $result;
 }
Ejemplo n.º 2
0
 public function user_comments_export($output)
 {
     fputcsv($output, array('User Email', 'User Comment', 'Comment Type', 'Created On'));
     $database = Mysql_Database::getInstance();
     //$date = date('m/d/Y h:i:s a', time());
     $rows = mysql_query('SELECT user_email,user_comment,comment_type,created_on FROM feedback_usercomments');
     // loop over the rows, outputting them
     while ($row = mysql_fetch_assoc($rows)) {
         if ($row['comment_type'] == 1) {
             $row['comment_type'] = "Positive";
         } else {
             $row['comment_type'] = "Negative";
         }
         //  print_r($row);
         fputcsv($output, $row);
     }
     //
 }