metal-0-1 Posted August 6, 2013 Report Share Posted August 6, 2013 (edited) . Edited March 23, 2014 by metal-0-1 Quote Link to comment Share on other sites More sharing options...
goma smile Posted August 7, 2013 Report Share Posted August 7, 2013 function get_articles() { $this->db->select('*'); // Nav obligāts $this->db->from('articles'); $this->db->order_by('timestampp', 'desc'); $query = $this->db->get(); return $query->result(); } Kas par erroru, moš pārak veca php versija viņa neatbalsta public, static, private f-cijas <-- ir bijis pieredzē, bet rets gadijums Quote Link to comment Share on other sites More sharing options...
Kavacky Posted August 7, 2013 Report Share Posted August 7, 2013 Tādam sūdam kā "izdzēšas tabula", "nepareizs lauka nosaukums" uz produkcijas vispār nav jānonāk. Quote Link to comment Share on other sites More sharing options...
jurchiks Posted August 7, 2013 Report Share Posted August 7, 2013 (edited) Kā jāsaprot "Ar šo tiek atslēgta arī automātiska erroru rakstīšana log failā"? Tas tā nopietni CodeIgniter ir uztaisīts? Kas tas par debīlismu? Anyway, try/catch ap "$articles = $this->articles_model->get_articles();", ja tev vajag konkrēti tajā situācijā, bet ja nē, tad normālam freimworkam vajadzētu būt globālam try/catch blokam tur, kur tiek izsaukts kontrolieris un action. + es kaut kā nesaprotu, nafig vajadzīgs tāds brīnums kā "$this->load->model('articles_model')"; var taču izmantot autoloading un vai nu statiskas metodes vai singleton. Edited August 7, 2013 by jurchiks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.