fork download
  1. <?php
  2. require_once 'dbconnect.class.php';
  3.  
  4. Class GetData extends Connect
  5. {
  6. private $database;
  7. public static $sql;
  8. public $data = array();
  9. public $dataObject;
  10. public $dataError;
  11. public $error;
  12.  
  13. public function __construct($database='')
  14. {
  15. $this->database = parent::mysqlConnect();
  16. }
  17.  
  18. protected function getData()
  19. {
  20. $query = mysql_query($this->sql, $this->database) or $this->error = mysql_error();
  21. while($rs = mysql_fetch_assoc($query))
  22. {
  23. $this->data[] = $rs;
  24. }
  25. $dataObject = (object) $this->data;
  26. return (array) $this->data;
  27. }
  28. }
  29. ?>
Runtime error #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
Warning: require_once(dbconnect.class.php): failed to open stream: No such file or directory in /home/l10S3l/prog.php on line 2

Fatal error: require_once(): Failed opening required 'dbconnect.class.php' (include_path='.:/usr/share/php5:/usr/share/php') in /home/l10S3l/prog.php on line 2