Carreguei sim...
Só que errado :-D
Eu estava fazendo assim:
$CI->load->database();
$CI->db->from('user');
$CI->db->where('userEmail', $this->mail);
$query = $CI->db->get();
E era assim: $this->CI->load->database(); :-!
Eu já tinha desistido e estava fazendo a consulta direta pelo php/mysql.
Graças a sua intervenção que deu essa luz, finalmente funcionou.
VALEU Henrique !!!
Abs.
Henrique de Castro escreveu:
> Talvez vc não carregou o database, não?!
>
> 2008/2/11, Marco Telles <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>:
>
> Sinistro mesmo, :-)
> Fazendo o var_dump no construtor, deu o resultado abaixo.
> Se fizer o var_dump em $this->CI dentro de um método criado em
> MY_Validation, ele repete o resultado, porém parece que entra num loop
> interminável até travar o navegador....
>
> Abs
>
>
>
> object(Home)#10 (11) { ["_ci_scaffolding"]=> bool(false)
> ["_ci_scaff_table"]=> bool(false) ["config"]=>
> &object(CI_Config)#3 (2)
> { ["config"]=> &array(32) { ["base_url"]=> string(23)
> "http://coyote/caliope2/" ["index_page"]=> string(0) ""
> ["uri_protocol"]=> string(4) "AUTO" ["url_suffix"]=> string(0) ""
> ["language"]=> string(12) "portuguesebr" ["charset"]=> string(10)
> "ISO-8859-1" ["enable_hooks"]=> bool(false) ["subclass_prefix"]=>
> string(3) "MY_" ["permitted_uri_chars"]=> string(13) "a-z 0-9~%.:_-"
> ["enable_query_strings"]=> bool(false) ["controller_trigger"]=>
> string(1) "c" ["function_trigger"]=> string(1) "m" ["log_threshold"]=>
> int(0) ["log_path"]=> string(0) "" ["log_date_format"]=> string(11)
> "d-m-Y H:i:s" ["cache_path"]=> string(0) "" ["encryption_key"]=>
> string(0) "" ["sess_cookie_name"]=> string(10) "ci_session"
> ["sess_expiration"]=> int(7200) ["sess_encrypt_cookie"]=> bool(true)
> ["sess_use_database"]=> bool(true) ["sess_table_name"]=> string(11)
> "ci_sessions" ["sess_match_ip"]=> bool(false)
> ["sess_match_useragent"]=>
> bool(true) ["sess_time_to_update"]=> int(300) ["cookie_prefix"]=>
> string(0) "" ["cookie_domain"]=> string(0) "" ["cookie_path"]=>
> string(1) "/" ["global_xss_filtering"]=> bool(false)
> ["compress_output"]=> bool(false) ["time_reference"]=> string(5)
> "local"
> ["rewrite_short_tags"]=> bool(false) } ["is_loaded"]=> array(0) { } }
> ["input"]=> &object(CI_Input)#8 (4) { ["use_xss_clean"]=> bool(false)
> ["ip_address"]=> bool(false) ["user_agent"]=> bool(false)
> ["allow_get_array"]=> bool(false) } ["benchmark"]=>
> &object(CI_Benchmark)#1 (1) { ["marker"]=> array(4) {
> ["total_execution_time_start"]=> string(21) "0.40450900 1202733679"
> ["loading_time_base_classes_start"]=> string(21) "0.40452700
> 1202733679"
> ["loading_time_base_classes_end"]=> string(21) "0.47483000 1202733679"
> ["controller_execution_time_( home / index )_start"]=> string(21)
> "0.47495700 1202733679" } } ["uri"]=> &object(CI_URI)#4 (5) {
> ["keyval"]=> array(0) { } ["uri_string"]=> string(0) "" ["segments"]=>
> array(0) { } ["rsegments"]=> array(2) { [0]=> string(4) "home" [1]=>
> string(5) "index" } ["config"]=> &object(CI_Config)#3 (2) {
> ["config"]=>
> &array(32) { ["base_url"]=> string(23) "http://coyote/caliope2/"
> ["index_page"]=> string(0) "" ["uri_protocol"]=> string(4) "AUTO"
> ["url_suffix"]=> string(0) "" ["language"]=> string(12) "portuguesebr"
> ["charset"]=> string(10) "ISO-8859-1" ["enable_hooks"]=> bool(false)
> ["subclass_prefix"]=> string(3) "MY_" ["permitted_uri_chars"]=>
> string(13) "a-z 0-9~%.:_-" ["enable_query_strings"]=> bool(false)
> ["controller_trigger"]=> string(1) "c" ["function_trigger"]=>
> string(1)
> "m" ["log_threshold"]=> int(0) ["log_path"]=> string(0) ""
> ["log_date_format"]=> string(11) "d-m-Y H:i:s" ["cache_path"]=>
> string(0) "" ["encryption_key"]=> string(0) "" ["sess_cookie_name"]=>
> string(10) "ci_session" ["sess_expiration"]=> int(7200)
> ["sess_encrypt_cookie"]=> bool(true) ["sess_use_database"]=>
> bool(true)
> ["sess_table_name"]=> string(11) "ci_sessions" ["sess_match_ip"]=>
> bool(false) ["sess_match_useragent"]=> bool(true)
> ["sess_time_to_update"]=> int(300) ["cookie_prefix"]=> string(0) ""
> ["cookie_domain"]=> string(0) "" ["cookie_path"]=> string(1) "/"
> ["global_xss_filtering"]=> bool(false) ["compress_output"]=>
> bool(false)
> ["time_reference"]=> string(5) "local" ["rewrite_short_tags"]=>
> bool(false) } ["is_loaded"]=> array(0) { } } } ["output"]=>
> &object(CI_Output)#6 (4) { ["final_output"]=> NULL
> ["cache_expiration"]=> int(0) ["headers"]=> array(0) { }
> ["enable_profiler"]=> bool(false) } ["lang"]=> &object(CI_Language)#9
> (2) { ["language"]=> array(0) { } ["is_loaded"]=> array(0) { } }
> ["load"]=> &object(CI_Loader)#11 (11) { ["_ci_ob_level"]=> int(0)
> ["_ci_view_path"]=> string(48)
> "/home/coyote/httpdocs/caliope2/ci_api_cal/views/" ["_ci_is_php5"]=>
> bool(true) ["_ci_is_instance"]=> bool(false) ["_ci_cached_vars"]=>
> array(0) { } ["_ci_classes"]=> array(3) { [0]=> string(54)
> "/home/coyote/httpdocs/ci160_core/libraries/Session.php" [1]=>
> string(54) "/home/coyote/httpdocs/ci160_core/libraries/Encrypt.php"
> [2]=> string(69)
> "/home/coyote/httpdocs/caliope2/ci_api_cal/libraries/MY_Validation.php"
> } ["_ci_models"]=> array(0) { } ["_ci_helpers"]=> array(0) { }
> ["_ci_plugins"]=> array(0) { } ["_ci_scripts"]=> array(0) { }
> ["_ci_varmap"]=> array(2) { ["unit_test"]=> string(4) "unit"
> ["user_agent"]=> string(5) "agent" } } ["db"]=>
> object(CI_DB_mysql_driver)#12 (50) { ["delete_hack"]=> bool(true)
> ["_count_string"]=> string(19) "SELECT COUNT(*) AS "
> ["_random_keyword"]=> string(7) " RAND()" ["ar_select"]=> array(0) { }
> ["ar_distinct"]=> bool(false) ["ar_from"]=> array(0) { } ["ar_join"]=>
> array(0) { } ["ar_where"]=> array(0) { } ["ar_like"]=> array(0) { }
> ["ar_groupby"]=> array(0) { } ["ar_having"]=> array(0) { }
> ["ar_limit"]=> bool(false) ["ar_offset"]=> bool(false) ["ar_order"]=>
> bool(false) ["ar_orderby"]=> array(0) { } ["ar_set"]=> array(0) { }
> ["ar_wherein"]=> array(0) { } ["ar_aliased_tables"]=> array(0) { }
> ["username"]=> string(7) "caliope" ["password"]=> string(11)
> "ftpcaliope1" ["hostname"]=> string(9) "localhost" ["database"]=>
> string(14) "caliope_mus_br" ["dbdriver"]=> string(5) "mysql"
> ["dbprefix"]=> string(0) "" ["autoinit"]=> bool(true) ["swap_pre"]=>
> string(0) "" ["port"]=> string(0) "" ["pconnect"]=> bool(true)
> ["conn_id"]=> resource(27) of type (mysql link persistent)
> ["result_id"]=> bool(false) ["db_debug"]=> bool(true) ["benchmark"]=>
> int(0) ["query_count"]=> int(0) ["bind_marker"]=> string(1) "?"
> ["save_queries"]=> bool(true) ["queries"]=> array(0) { }
> ["query_times"]=> array(0) { } ["data_cache"]=> array(0) { }
> ["trans_enabled"]=> bool(true) ["_trans_depth"]=> int(0)
> ["_trans_status"]=> bool(true) ["cache_on"]=> bool(false)
> ["cachedir"]=>
> string(0) "" ["cache_autodel"]=> bool(false) ["CACHE"]=> NULL
> ["stmt_id"]=> NULL ["curs_id"]=> NULL ["limit_used"]=> NULL
> ["char_set"]=> string(4) "utf8" ["dbcollat"]=> string(15)
> "utf8_general_ci" } ["encrypt"]=> object(CI_Encrypt)#14 (6) { ["CI"]=>
> &object(Home)#10 (11) { ["_ci_scaffolding"]=> bool(false)
> ["_ci_scaff_table"]=> bool(false) ["config"]=>
> &object(CI_Config)#3 (2)
> { ["config"]=> &array(32) { ["base_url"]=> string(23)
> "http://coyote/caliope2/" ["index_page"]=> string(0) ""
> ["uri_protocol"]=> string(4) "AUTO" ["url_suffix"]=> string(0) ""
> ["language"]=> string(12) "portuguesebr" ["charset"]=> string(10)
> "ISO-8859-1" ["enable_hooks"]=> bool(false) ["subclass_prefix"]=>
> string(3) "MY_" ["permitted_uri_chars"]=> string(13) "a-z 0-9~%.:_-"
> ["enable_query_strings"]=> bool(false) ["controller_trigger"]=>
> string(1) "c" ["function_trigger"]=> string(1) "m" ["log_threshold"]=>
> int(0) ["log_path"]=> string(0) "" ["log_date_format"]=> string(11)
> "d-m-Y H:i:s" ["cache_path"]=> string(0) "" ["encryption_key"]=>
> string(0) "" ["sess_cookie_name"]=> string(10) "ci_session"
> ["sess_expiration"]=> int(7200) ["sess_encrypt_cookie"]=> bool(true)
> ["sess_use_database"]=> bool(true) ["sess_table_name"]=> string(11)
> "ci_sessions" ["sess_match_ip"]=> bool(false)
> ["sess_match_useragent"]=>
> bool(true) ["sess_time_to_update"]=> int(300) ["cookie_prefix"]=>
> string(0) "" ["cookie_domain"]=> string(0) "" ["cookie_path"]=>
> string(1) "/" ["global_xss_filtering"]=> bool(false)
> ["compress_output"]=> bool(false) ["time_reference"]=> string(5)
> "local"
> ["rewrite_short_tags"]=> bool(false) } ["is_loaded"]=> array(0) { } }
> ["input"]=> &object(CI_Input)#8 (4) { ["use_xss_clean"]=> bool(false)
> ["ip_address"]=> bool(false) ["user_agent"]=> bool(false)
> ["allow_get_array"]=> bool(false) } ["benchmark"]=>
> &object(CI_Benchmark)#1 (1) { ["marker"]=> array(4) {
> ["total_execution_time_start"]=> string(21) "0.40450900 1202733679"
> ["loading_time_base_classes_start"]=> string(21) "0.40452700
> 1202733679"
> ["loading_time_base_classes_end"]=> string(21) "0.47483000 1202733679"
> ["controller_execution_time_( home / index )_start"]=> string(21)
> "0.47495700 1202733679" } } ["uri"]=> &object(CI_URI)#4 (5) {
> ["keyval"]=> array(0) { } ["uri_string"]=> string(0) "" ["segments"]=>
> array(0) { } ["rsegments"]=> array(2) { [0]=> string(4) "home" [1]=>
> string(5) "index" } ["config"]=> &object(CI_Config)#3 (2) {
> ["config"]=>
> &array(32) { ["base_url"]=> string(23) "http://coyote/caliope2/"
> ["index_page"]=> string(0) "" ["uri_protocol"]=> string(4) "AUTO"
> ["url_suffix"]=> string(0) "" ["language"]=> string(12) "portuguesebr"
> ["charset"]=> string(10) "ISO-8859-1" ["enable_hooks"]=> bool(false)
> ["subclass_prefix"]=> string(3) "MY_" ["permitted_uri_chars"]=>
> string(13) "a-z 0-9~%.:_-" ["enable_query_strings"]=> bool(false)
> ["controller_trigger"]=> string(1) "c" ["function_trigger"]=>
> string(1)
> "m" ["log_threshold"]=> int(0) ["log_path"]=> string(0) ""
> ["log_date_format"]=> string(11) "d-m-Y H:i:s" ["cache_path"]=>
> string(0) "" ["encryption_key"]=> string(0) "" ["sess_cookie_name"]=>
> string(10) "ci_session" ["sess_expiration"]=> int(7200)
> ["sess_encrypt_cookie"]=> bool(true) ["sess_use_database"]=>
> bool(true)
> ["sess_table_name"]=> string(11) "ci_sessions" ["sess_match_ip"]=>
> bool(false) ["sess_match_useragent"]=> bool(true)
> ["sess_time_to_update"]=> int(300) ["cookie_prefix"]=> string(0) ""
> ["cookie_domain"]=> string(0) "" ["cookie_path"]=> string(1) "/"
> ["global_xss_filtering"]=> bool(false) ["compress_output"]=>
> bool(false)
> ["time_reference"]=> string(5) "local" ["rewrite_short_tags"]=>
> bool(false) } ["is_loaded"]=> array(0) { } } } ["output"]=>
> &object(CI_Output)#6 (4) { ["final_output"]=> NULL
> ["cache_expiration"]=> int(0) ["headers"]=> array(0) { }
> ["enable_profiler"]=> bool(false) } ["lang"]=> &object(CI_Language)#9
> (2) { ["language"]=> array(0) { } ["is_loaded"]=> array(0) { } }
> ["load"]=> &object(CI_Loader)#11 (11) { ["_ci_ob_level"]=> int(0)
> ["_ci_view_path"]=> string(48)
> "/home/coyote/httpdocs/caliope2/ci_api_cal/views/" ["_ci_is_php5"]=>
> bool(true) ["_ci_is_instance"]=> bool(false) ["_ci_cached_vars"]=>
> array(0) { } ["_ci_classes"]=> array(3) { [0]=> string(54)
> "/home/coyote/httpdocs/ci160_core/libraries/Session.php" [1]=>
> string(54) "/home/coyote/httpdocs/ci160_core/libraries/Encrypt.php"
> [2]=> string(69)
> "/home/coyote/httpdocs/caliope2/ci_api_cal/libraries/MY_Validation.php"
> } ["_ci_models"]=> array(0) { } ["_ci_helpers"]=> array(0) { }
> ["_ci_plugins"]=> array(0) { } ["_ci_scripts"]=> array(0) { }
> ["_ci_varmap"]=> array(2) { ["unit_test"]=> string(4) "unit"
> ["user_agent"]=> string(5) "agent" } } ["db"]=>
> object(CI_DB_mysql_driver)#12 (50) { ["delete_hack"]=> bool(true)
> ["_count_string"]=> string(19) "SELECT COUNT(*) AS "
> ["_random_keyword"]=> string(7) " RAND()" ["ar_select"]=> array(0) { }
> ["ar_distinct"]=> bool(false) ["ar_from"]=> array(0) { } ["ar_join"]=>
> array(0) { } ["ar_where"]=> array(0) { } ["ar_like"]=> array(0) { }
> ["ar_groupby"]=> array(0) { } ["ar_having"]=> array(0) { }
> ["ar_limit"]=> bool(false) ["ar_offset"]=> bool(false) ["ar_order"]=>
> bool(false) ["ar_orderby"]=> array(0) { } ["ar_set"]=> array(0) { }
> ["ar_wherein"]=> array(0) { } ["ar_aliased_tables"]=> array(0) { }
> ["username"]=> string(7) "caliope" ["password"]=> string(11)
> "ftpcaliope1" ["hostname"]=> string(9) "localhost" ["database"]=>
> string(14) "caliope_mus_br" ["dbdriver"]=> string(5) "mysql"
> ["dbprefix"]=> string(0) "" ["autoinit"]=> bool(true) ["swap_pre"]=>
> string(0) "" ["port"]=> string(0) "" ["pconnect"]=> bool(true)
> ["conn_id"]=> resource(27) of type (mysql link persistent)
> ["result_id"]=> bool(false) ["db_debug"]=> bool(true) ["benchmark"]=>
> int(0) ["query_count"]=> int(0) ["bind_marker"]=> string(1) "?"
> ["save_queries"]=> bool(true) ["queries"]=> array(0) { }
> ["query_times"]=> array(0) { } ["data_cache"]=> array(0) { }
> ["trans_enabled"]=> bool(true) ["_trans_depth"]=> int(0)
> ["_trans_status"]=> bool(true) ["cache_on"]=> bool(false)
> ["cachedir"]=>
> string(0) "" ["cache_autodel"]=> bool(false) ["CACHE"]=> NULL
> ["stmt_id"]=> NULL ["curs_id"]=> NULL ["limit_used"]=> NULL
> ["char_set"]=> string(4) "utf8" ["dbcollat"]=> string(15)
> "utf8_general_ci" } ["encrypt"]=> object(CI_Encrypt)#14 (6) { ["CI"]=>
> *RECURSION* ["encryption_key"]=> string(0) "" ["_hash_type"]=>
> string(4)
> "sha1" ["_mcrypt_exists"]=> bool(true) ["_mcrypt_cipher"]=> NULL
> ["_mcrypt_mode"]=> NULL } } ["encryption_key"]=> string(0) ""
> ["_hash_type"]=> string(4) "sha1" ["_mcrypt_exists"]=> bool(true)
> ["_mcrypt_cipher"]=> NULL ["_mcrypt_mode"]=> NULL } }
>
>
>
>
> Henrique de Castro escreveu:
> > Sinistro.. ele consegue pegar a instância do CI?! Ou nem isso?!
> >
> > Em 11/02/08, *Marco Telles* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>> escreveu:
> >
> > Fiz assim:
> > function __construct() {
> > parent::__construct();
> > $CI =& get_instance();
> >
> > e deu o mesmo erro.
> >
> > Fiz como vc deu o exemplo:
> > function __construct() {
> > parent::__construct();
> > $this->CI =& get_instance();
> >
> > e ao chamar o bd deu tela branca...
> >
> >
> > Henrique de Castro escreveu:
> > > Achei um arquivo que eu usava aqui, ta assim:
> > >
> > > function __construct($params = array()) {
> > > parent::__construct($params);
> > > $this->CI =& get_instance();
> > > }
> > >
> > > Em 11/02/08, *Henrique de Castro* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>>>
> > escreveu:
> > >
> > > Eu extendi.. inclusive usei em 2 classes, em uma
> library de grid
> > > que fiz e no My_validation tb.. hj a noite dou uma
> confirmada no
> > > código que fiz e qualquer coisa eu te falo..
> > > Um detalhe, no parent chame o __construct... se não me
> engano
> > > dessa forma que vc fez é meio PHP4, mas não tenho tanta
> > certeza disso.
> > >
> > > Em 11/02/08, *Marco Telles*
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>> escreveu:
> > >
> > > Oi Henrique,
> > >
> > > O construtor está assim:
> > > function __construct() {
> > > parent::CI_Validation();
> > > $CI =& get_instance();
> > > }
> > >
> > > Olhei o pagination e não vi nada de diferente. No
> construtor
> > > ele só
> > > inicializa os parâmetros do pagination e trabalha
> direto
> > com o
> > > $CI em:
> > > // Determine the current page number.
> > > $CI =& get_instance();
> > > if ($CI->uri->segment($this->uri_segment)
> != 0)
> > >
> > > No guia do CI fala em usar esse recurso na criação
> de nossas
> > > classes,
> > > mas não fala nada sobre isso na extensão de uma
> classe.
> > >
> > > "Para acessar os recursos nativos do Code Igniter
> dentro
> > de sua
> > > biblioteca use a função get_instance(). Esta função
> > retorna o
> > > super
> > > objeto Code Igniter."
> > >
> > > Quando vc fez isso foi numa classe que criou ou
> extendeu ???
> > >
> > > Abs
> > >
> > >
> > >
> > > Henrique de Castro escreveu:
> > > > Tô sem meus códigos do CI agora, mas fiz isso em uma
> > library,
> > > talvez
> > > > vc não tenha chamado o método contrutor pai.. de
> tudo,
> > olha a
> > > library
> > > > pagination, se não me engano, ela usa a instancia do
> > CI dessa
> > > forma.
> > > > Se até a noite vc não tiver conseguido eu olho como
> > fiz qdo
> > > chegar em
> > > > ksa e te passo.
> > > >
> > > > Em 11/02/08, *Marco Telles*
> > <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>
> > > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>>> escreveu:
> > > >
> > > > Fiz isso no construtor e dá erro
> > > >
> > > > $CI =& get_instance();
> > > > $CI->load->database();
> > > >
> > > > Message: Undefined variable: CI
> > > >
> > > > Filename: libraries/MY_Validation.php
> > > >
> > > > Line Number: 28
> > > >
> > > >
> > > > Message: Trying to get property of non-object
> > > >
> > > > Filename: libraries/MY_Validation.php
> > > >
> > > > Line Number: 28
> > > >
> > > > *Fatal error*: Call to a member function
> from() on a
> > > non-object in
> > > > *libraries/MY_Validation.php* on line *28
> > > > *
> > > >
> > > > *linha 28: $CI->db->from('user');
> > > > *
> > > >
> > > >
> > > >
> > > > Muita sorte para nós!
> > > >
> > > > Marco Telles
> > > >
> > > >
> > > >
> > > > Henrique de Castro escreveu:
> > > > > Pega a instancia do CI e usa, tipo:
> > > > > $CI =& get_instance();
> > > > > $CI->load->database();
> > > > > etc.
> > > > >
> > > > > Em 10/02/08, *Marco Telles*
> > > <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>
> > > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>>
> > > > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>
> > > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>
> > > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>>>>>> escreveu:
> > > > >
> > > > > Extendi a classe Validation para o
> > MY_Validation e
> > > gostaria de
> > > > > acrescentar métodos de validação no BD, só
> > que não
> > > está dando
> > > > > certo :-(
> > > > >
> > > > > Ex.:
> > > > > 1. No controler eu chamo o model user para
> > validar
> > > os dados
> > > > do usuário
> > > > > 2. No model user eu carrego o Validation
> > > > > 3. Para o email, criei uma regra:
> > > > > $regras['userEmail'] =
> > > > >
> > > >
> > >
> >
>
> "trim|required|valid_email|max_length[100]|unique_email[$this->userEmail]";
> > > > > 4. No MY_Validation eu criei o método:
> > > > > unique_email( $email ) onde eu
> verifico se o
> > email
> > > já existe
> > > > > cadastrado
> > > > >
> > > > > E aí é que está o problema, como
> acessar o bd
> > > dentro de um
> > > > método
> > > > > de uma
> > > > > classe extendida (MY_Validation) ???
> > > > >
> > > > > Abs e um bom início de semana para todos!!
> > > > >
> > > > >
> > > > > --
> > > > > Muita sorte para nós!
> > > > >
> > > > > Marco Telles
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> _______________________________________________
> > > > > Lista mailing list
> > > > > [email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>>
> > > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>>>
> > > > >
> > > >
> > >
> >
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> ------------------------------------------------------------------------
> > > > >
> > > > >
> _______________________________________________
> > > > > Lista mailing list
> > > > > [email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>>
> > > > >
> > >
> >
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> > > > >
> > > >
> > > > _______________________________________________
> > > > Lista mailing list
> > > > [email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > > <mailto:[email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>>
> > > >
> > >
> >
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> > > >
> > > >
> > > >
> >
> ------------------------------------------------------------------------
> > > >
> > > > _______________________________________________
> > > > Lista mailing list
> > > > [email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> <mailto:[email protected] <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>
> > > >
> >
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> > > >
> > >
> > > _______________________________________________
> > > Lista mailing list
> > > [email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> <mailto:[email protected] <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>>
> > >
> >
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> > >
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > Lista mailing list
> > > [email protected] <mailto:[email protected]>
> <mailto:[email protected] <mailto:[email protected]>>
> > >
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> > >
> >
> > _______________________________________________
> > Lista mailing list
> > [email protected] <mailto:[email protected]>
> <mailto:[email protected] <mailto:[email protected]>>
> >
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Lista mailing list
> > [email protected] <mailto:[email protected]>
> > http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
> >
>
> _______________________________________________
> Lista mailing list
> [email protected] <mailto:[email protected]>
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Lista mailing list
> [email protected]
> http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br
>
_______________________________________________
Lista mailing list
[email protected]
http://codeigniter.com.br/mailman/listinfo/lista_codeigniter.com.br