codeigniter

Is there a way to get the highest and lowest scores using just PHP?

ε祈祈猫儿з 提交于 2020-05-17 08:48:07
问题 I have a score table for students in a class. All tests and exam scores for subjects are collated and recorded there. CREATE TABLE `scores_primary` ( `id` int(20) NOT NULL, `student_id` int(11) DEFAULT NULL, `class_id` int(5) DEFAULT NULL, `section_id` int(5) DEFAULT NULL, `subject_id` int(11) DEFAULT NULL, `session_id` int(11) DEFAULT NULL, `ca1` int(11) DEFAULT NULL, `ca2` int(11) DEFAULT NULL, `ca3` int(11) DEFAULT NULL, `ca4` int(11) DEFAULT NULL, `ca5` float(10,1) DEFAULT NULL, `ca6`

Is there a way to get the highest and lowest scores using just PHP?

扶醉桌前 提交于 2020-05-17 08:47:03
问题 I have a score table for students in a class. All tests and exam scores for subjects are collated and recorded there. CREATE TABLE `scores_primary` ( `id` int(20) NOT NULL, `student_id` int(11) DEFAULT NULL, `class_id` int(5) DEFAULT NULL, `section_id` int(5) DEFAULT NULL, `subject_id` int(11) DEFAULT NULL, `session_id` int(11) DEFAULT NULL, `ca1` int(11) DEFAULT NULL, `ca2` int(11) DEFAULT NULL, `ca3` int(11) DEFAULT NULL, `ca4` int(11) DEFAULT NULL, `ca5` float(10,1) DEFAULT NULL, `ca6`

change search item url and routing in codeigniter

自古美人都是妖i 提交于 2020-05-17 06:34:36
问题 I want to change the URL with Codeigniter routing: here is my url: home/search?location=BD home/search?location=BD&category[]=123 home/search?location=BD&category[]=123&category[]=124&category[]=125 like above url but I want to routing this url with home/BD home/BD/123 home/BD/123+124+125 or home/BD/123/124/125 My route.php : $route['home/(:any)/(:any)'] = 'home/search/$1'; What is my problem in route.php page? 回答1: Try to use a (.+) pattern on your route.php , the $1 will contain the

Capture data from CSV file contain variable for API request to save in new CSV file

霸气de小男生 提交于 2020-05-16 22:32:06
问题 I need the tracking number and order number when every line of Unique ID send the API request to the URL, and capture it to save in the new CSV file altogether with the API response.I really need help for this :/ packet.csv (CSV file contains variable for API request) - Tracking #,Order #,Unique ID - AB74832493,0dajKDhsa,478324 - CD78437294,kDHIdsan98,768542 track.csv (API response) delivered,"2020-04-21 13:10:12" delivered,"2020-02-29 12:55:51" delivered,"2020-04-21 12:42:16" desired track

function inside a view in codeigniter

十年热恋 提交于 2020-05-15 04:52:09
问题 i'm a newbie in ci , can anyone help me or give some suggestions in my code and best practice? i have a foreach statement that require to use a function for displaying a huge data. here's my sample code of view. Thank you in advance foreach($data->result() as $d){ if($d->condi){ $sample = myfunction($d->value1, $d->value2, $value->3); } else{ $d->otherdisplay; if($d->condition2){ $sample = myfunction($d->value1, $d->value2, $value->3); } } } function myfunction($a,$b,$c){ /*do something;*/ }

Retrieve date and convert it to specific time zone according to user time zone

泄露秘密 提交于 2020-05-12 08:36:10
问题 i want retrieve date from database(s_start) and convert it to Specific time zone like (Africa/Cairo) according to user time zone from database (s_timezone) i can only retrieve orginal date stored in database and i can't convert the result My controller code : $this->db->select('s_id'); $this->db->select('s_start'); $this->db->from('sessions'); $query = $this->db->get($this->event); if ($query) { return $query->result(); } return NULL; html code : <div id="cal-slide-content" class="cal-event

Retrieve date and convert it to specific time zone according to user time zone

末鹿安然 提交于 2020-05-12 08:35:12
问题 i want retrieve date from database(s_start) and convert it to Specific time zone like (Africa/Cairo) according to user time zone from database (s_timezone) i can only retrieve orginal date stored in database and i can't convert the result My controller code : $this->db->select('s_id'); $this->db->select('s_start'); $this->db->from('sessions'); $query = $this->db->get($this->event); if ($query) { return $query->result(); } return NULL; html code : <div id="cal-slide-content" class="cal-event

Retrieve date and convert it to specific time zone according to user time zone

对着背影说爱祢 提交于 2020-05-12 08:35:07
问题 i want retrieve date from database(s_start) and convert it to Specific time zone like (Africa/Cairo) according to user time zone from database (s_timezone) i can only retrieve orginal date stored in database and i can't convert the result My controller code : $this->db->select('s_id'); $this->db->select('s_start'); $this->db->from('sessions'); $query = $this->db->get($this->event); if ($query) { return $query->result(); } return NULL; html code : <div id="cal-slide-content" class="cal-event

error Access-Control-Allow-Origin header on codeigniter

自闭症网瘾萝莉.ら 提交于 2020-05-12 01:54:49
问题 i am getting the error of XMLHttpRequest cannot load, No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://abc' is therefore not allowed access.. i am very new in php and codeigniter and so i cannot really understand what is going on. i tried reading other materials here in stackoverflow but it just left me blank. I am sorry if this is a duplicate post to you but I really need help. here is the ajax call for the view: $("#btnLoginFB").click(function() {

error Access-Control-Allow-Origin header on codeigniter

ⅰ亾dé卋堺 提交于 2020-05-12 01:53:06
问题 i am getting the error of XMLHttpRequest cannot load, No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://abc' is therefore not allowed access.. i am very new in php and codeigniter and so i cannot really understand what is going on. i tried reading other materials here in stackoverflow but it just left me blank. I am sorry if this is a duplicate post to you but I really need help. here is the ajax call for the view: $("#btnLoginFB").click(function() {