Archive for the “Php Class” category

Class Element: consultar el valor v de la tabla t con id determinada

by beto on June 19, 2011

include_once “mysqlconn.php”; class element{ var $id; var $tabla; var $link; var $ip; var $data; function element($id,$tabla){ $this->id = $id; $this->tabla = $tabla; $mysql = new mysqlconn; $this->link = $mysql->conectar(); $this->cache(); } function cache(){ $q = $this->sql_string(); $this->data = mysql_fetch_array($q); } (…)

Read the rest of this entry »

Clase MYSQL: Conectar base de datos

by beto on June 19, 2011

class mysqlconn{ var $server; var $user_sql; var $pass_sql; var $link_id; var $bd; function mysqlconn(){ $this->server = “localhost”; $this->user_sql = “USUARIO MYSQL”; $this->pass_sql = “PASSWORD MYSQL”; $this->bd = “BASE DE DATOS”; $link = mysql_connect($this->server, $this->user_sql, $this->pass_sql); mysql_select_db($this->bd, $link); $this->link_id = $link; (…)

Read the rest of this entry »