bueno, ya consegui la respuesta a porke no me andaba... aunq me gustaria entender porke...
probe varias cosas.... hasta puse un <? require('conf.inc.php') ?> dentro de la funcion que necesito pero no me toma la variable de la tabla por ejemplo ak:
Código PHP:
<?
class GetUserInfo{
private $_query;
private $_fetch;
private $_user;
private $_id;
public function UserID($User){
// Aqui mismo probe haciendo el require del archivo donde defino la variable: $USER_TABLE...
// Pero nada... hasta intente haciendola global xD pero no la toma, no se porke...
// asi ke tube q definir la varialbe de la tabla aki mismo para q ande... asi:
// $USER_TABLE = "users_table";
$this->_query = MySQLFunctions::ConnectMySQL($USERS_TABLE, "", "", "");
while($this->_fetch = mysql_fetch_array($this->_query)){
if($this->_fetch['User'] == $User){
$this->_id = $this->_fetch['ID'];
}
}
return $this->_id;
}
public function User($ID){
$this->_query = MySQLFunctions::ConnectMySQL($USERS_TABLE, "", "", "");
while($this->_fetch = mysql_fetch_array($this->_query)){
if($this->_fetch['ID'] == $ID){
$this->_user = $this->_fetch['User'];
}
}
return $this->_user;
}
}
?>
pero bue, lo deje asi, total no es molestia, pero no entiendo porke nunca me tomo la variable, ni sikiera incluyendo el archivo donde esta definida DENTRO de la funcion, y tampoco haciendola global, q es lo q no kiero.
bueno, saludos... problem solved. :)
Gracias igual GatorV, al menos me enseñaste a usar el mysql_insert_id(): ;)
chau!