News, conferences and seminar


ORC 2017
4th International Conference on ORC
Milano, 13-15 September

http://www.orc2017.com/

Setup($conf["USER"],$conf["PWD"]); $this->host=$conf["HOST"]; $this->Create(); $this->SelectDB($conf["DB_NAME"]); } function Setup($user, $pass) { if (!$user) { $this->user = "nobody"; } if (!$pass) { $this->pass = ""; } $this->user = $user; $this->pass = $pass; } function Create() { $this->id = mysql_connect($this->host, $this->user, $this->pass) or MySQL_ErrorMsg("Unable to connect to MySQL server: $this->host : '$SERVER_NAME' "); } function SelectDB ($db) { mysql_select_db($db, $this->id) or MySQL_ErrorMsg ("Unable to select database: $db"); } function Query ($query) { $this->result =@mysql_query($query, $this->id) or MySQL_ErrorMsg ("Unable to perform query: $query"); $this->rows = @mysql_num_rows($this->result); $this->a_rows = @mysql_affected_rows($this->id); } function QueryItem ($query) { $this->result = @mysql_query($query, $this->id) or MySQL_ErrorMsg ("Unable to perform query: $query"); $this->rows = @mysql_num_rows($this->result); $this->a_rows = @mysql_affected_rows($this->id); $this->data = @mysql_fetch_array($this->result) or MySQL_ErrorMsg ("Unable to fetch data from query: $query"); return($this->data[0]); } function QueryRow ($query) { $this->result = @mysql_query($query, $this->id) or MySQL_ErrorMsg ("Unable to perform query: $query"); $this->rows = @mysql_num_rows($this->result); $this->a_rows = @mysql_affected_rows($this->id); $this->data = @mysql_fetch_array($this->result) or MySQL_ErrorMsg ("Unable to fetch data from query: $query"); return($this->data); } function Fetch ($row) { @mysql_data_seek($this->result, $row) or MySQL_ErrorMsg ("Unable to seek data row: $row"); $this->data = @mysql_fetch_array($this->result) or MySQL_ErrorMsg ("Unable to fetch row: $row"); } function Insert ($query) { $this->result = @mysql_query($query, $this->id) or MySQL_ErrorMsg ("Unable to perform insert: $query"); $this->a_rows = @mysql_affected_rows($this->id); $this->insert_id = @mysql_insert_id($this->id); } function Update ($query) { $this->result = @mysql_query($query, $this->id) or MySQL_ErrorMsg ("Unable to perform update: $query"); $this->a_rows = @mysql_affected_rows($this->id); } function Delete ($query) { $this->result = @mysql_query($query, $this->id) or MySQL_ErrorMsg ("Unable to perform Delete: $query"); $this->a_rows = @mysql_affected_rows($this->id); } } function MySQL_ErrorMsg ($msg) { # Close out a bunch of HTML constructs which might prevent # the HTML page from displaying the error text. echo("\n"); echo("\n"); # Display the error message $text = "

Error: $msg :"; $text .= mysql_error(); $text .= "\n"; die($text); } ?>