Welcome Guest, Not a member yet? Register   Sign In
Need help for an rookie
#1
Heart 

Hello,

Sorry for my English.
With this function , I retrieves the number of identical record in the " from_user_id " the table "user- love" .

num_rows() displays the number of recording

I want to insert a new tabe "score" value " from_user_id " and the result given by " num_row " that two field  " from_user_id " and " nb_kiff

but I can not seem to find the right combination .
Is a charming young man can help me to complete this function ?

thank you in advance



Here is my Model
Code:
function count_add_kiff($add_kiff) {

$query = $this->db->select("from_user_id");
$query = $this->db->from("user_love");
$query = $this->db->like("from_user_id", $add_kiff);
$query = $this->db->get();
return $query->num_rows();


Here is my Controleur

Code:
$add_kiff = $this->news_model->count_add_kiff($this->session->userdata("user_id"));
                $data["ajout_kiff"] = $add_kiff;
Reply


Messages In This Thread
Need help for an rookie - by Violette - 11-28-2015, 07:01 AM
RE: Need help for an rookie - by Violette - 11-29-2015, 10:38 PM
RE: Need help for an rookie - by Violette - 11-30-2015, 02:48 AM
RE: Need help for an rookie - by Violette - 11-30-2015, 05:13 AM



Theme © iAndrew 2016 - Forum software by © MyBB