logo
down
shadow

I want some correction on my result using codeigniter


I want some correction on my result using codeigniter

By : Sam Colins
Date : December 05 2020, 12:22 PM
Hope that helps It is bit complex but solve your issue. If anyone else can give better then this solution. I'll be appreciated.
code :
public function select_data() {
$this->db->distinct();
$this->db->select('extt_std as std');
$this->db->from('exam_time_table');
$query = $this->db->get();
if ($query->num_rows() > 0) {
    foreach ($query->result() as $row) {
        $row->standard = $row->std;
        $data[] = $row;

        $this->db->select('*');
        $this->db->from('exam_time_table');
        $this->db->where('exam_time_table.extt_std', $row->std);
        $this->db->where('exam_time_table.extt_sess', 'AN');
        $subquery = $this->db->get_compiled_select();

        $this->db->select('*');
        $this->db->from('exam_time_table');
        $this->db->where('exam_time_table.extt_std', $row->std);
        $this->db->where('exam_time_table.extt_sess', 'FN');
        $subquery2 = $this->db->get_compiled_select();

        $this->db->select('a.*,b.*');
        $this->db->from('('.$subquery.') a');
        $this->db->join('('.$subquery2.') b','a.extt_std=b.extt_std','');
        $get = $this->db->result();

        foreach ($get as $row) {
            if ($row->extt_sess == 'FN') {
                $row->fornoon = $row->extt_sub;
                $row->afternoon = '';
            }
            if ($row->extt_sess == 'AN') {
                $row->fornoon = '';
                $row->afternoon = $row->extt_sub;
            }
            $data[]=$row;
        }
    }
    return $data;
}
return false;
}


Share : facebook icon twitter icon
Form input correction & database query- Codeigniter

Form input correction & database query- Codeigniter


By : Saranya
Date : March 29 2020, 07:55 AM
hop of those help? The function you're looking for is count_all_results, and you are only supposed to put the table name as your parameter for count_all_results.
code :
$this->db->where('email', $str);
$num = $this->db->count_all_results('mytable');
Codeigniter Query result returning Custom result object with setters

Codeigniter Query result returning Custom result object with setters


By : PassionArya
Date : March 29 2020, 07:55 AM
hop of those help? I found your question while looking for a solution for myself.
After digging a bit in the documentation I managed to figure it out:
code :
class user_item {
  // you can declare all the attributes you want as private
  private $id,$name,$dob,$gender,$role,$username,$password,$salt,$picture,$lastactive;

  function __construct(){
    // you can use the constructor to format data as needed
    $this->username = strtouppper($this->username);  
  }

  public function set_password($p){
    $this->generateSalt();
    $this->password = $p.$this->salt;
  }

  public function get_password(){
    return $this->password;
  }
}
class User_model extends CI_Model {
   public function get_user($id){
     return $this->db->get_where('users', array('id' => $id), 1)->result('user_item');
   }
}
class Users extends CI_Controller {
  function __construct(){
     $this->load->model('user');
  }
  public function profile($user_id){
    var $myUser = $this->user->get_user($user_id);
    $myUser->set_password('myPassword');
    echo $myUser->get_password();
  }
}
getting result after grammar correction from gingerit

getting result after grammar correction from gingerit


By : user2955042
Date : November 22 2020, 10:33 AM
I think the issue was by ths following , for grammar correction in my python app, I am using gingerit-0.5.4 . this is one of best module for spell and grammar correction. but i did not know how to get result of sentence from parser.parse() after correction. , You need result key from parser.parse returned dict. Try:
code :
print parser.parse(text)['result']
array prints result in controller but not giving result in view ,codeigniter

array prints result in controller but not giving result in view ,codeigniter


By : audi diya
Date : March 29 2020, 07:55 AM
will be helpful for those in need Print $country in view. Use echo ""; print_r($country);. I think you used foreach loop for data print and Country_id doesn't exist in database table column.So this error occured.
Applying a Bonferroni Correction on a chi square test result R

Applying a Bonferroni Correction on a chi square test result R


By : Maaz Bin Ibrahim
Date : March 29 2020, 07:55 AM
Hope this helps If you are going to do multiple pairwise comparisons after your overall Chi Sq test, your Bonferroni correction would be .05/(number of tests). See helpful references here and here
You probably need to test all possible pairs, meaning that you'd be doing a lot more than 10 tests. However, before going ahead, you might want to think about other ways to tackle this.
Related Posts Related Posts :
  • Endline after certain number of characters
  • aspnet core app strange request type
  • Loop over one array as if it was a multidimensional array
  • I need to extract number from given strings using php
  • Add image to sub-category instead of text link PHP-OPENCART
  • Laravel: return JSON model with relation
  • Combining arrays from config files
  • Php character count without spaces and html tags
  • how to access all array values in php?
  • How to get eBay item URL based on item ID
  • Event broadcating: Laravel Echo fails receiving broadcasts
  • Chrome extension to execute php file
  • PHP update password form not working
  • Behat stopped working SSL error fwrite() laravel
  • If Statements in print to loop new <li>
  • PHP cafile below version 5.6
  • Selecting by two parameters from table
  • Laravel 5.3 Route::get() returns error Class [classname] does not exist
  • simple_array handling with SonataAdminBundle
  • Codeigniter Email Confirmations
  • Why is it i can't display image? i been trying so many different codes but the image still doesn't display
  • Variadic Variables by Reference
  • php :select column in array with Undefined index error
  • Missing composer/zend command: development-enable
  • how to load array response from ajax into array input textbox
  • Reorder WordPress Plugin echo Order On Posts
  • Want to take backup of code in PHP where files which are to be taken as backup is read from another specified (patch)fol
  • MySQL output in PHP tables
  • line 5: Call to undefined function link_to_route()
  • Sql request with php : select posts where there is a youtube link
  • ZF2 - how to use require_once as $this->render?
  • How to run unit testing in cakephp3?
  • Odd behaviour of array_diff
  • CakePHP Virtual Fields send headers?
  • mySQL in server Terminal, need to see output
  • How to get a single data from comma separated array and displaying data of that record using codeigniter php
  • SELECTING Multiple Rows with an Array and then INSERT to another statement
  • Cron and SetTimeZone in PHP file
  • arrays and index php
  • Yii2 - trasitive dependency in active records
  • Is it possible with docker to run more than one app on port 80 on the same computer?
  • How to work with stripe in laravel 5.2
  • Append <figure> tag at the starting and ending of <img> tag in PHP
  • Autofill form data after login
  • php artisan not returning anything
  • array_intersect_key with three array in php
  • PHP / mySQL - prepare and bind locally
  • how to display controller array values in mvc concept?
  • While loop without explicit increment / counter (basic)
  • updated values are displaying only after refreshing the page
  • PHP: update on DB if i pass it through get url
  • Select * from table where columns contain a keyword
  • Wildcard to route to a controller
  • Unknown component ID: authClientCollection
  • make standings table soccer league
  • Laravel pusher error: JSON returned from webapp was invalid, yet status code was 200
  • How to get most downloads records
  • What argument does my function need to echo get_results() query results
  • Laravel - Toggle value in database with checkbox and ajax
  • $_POST is not working in web services?
  • shadow
    Privacy Policy - Terms - Contact Us © soohba.com