Welcome Guest, Not a member yet? Register   Sign In
Fetch value in query and store in array
#1

[eluser]rochellecanale[/eluser]
Hello guys just need a little help in query. This is not a CI problem but I hope that you can help me.

This is my simple query result:
Code:
mysql> SELECT DISTINCT(fkmember) FROM points_ledger;
+----------+
| fkmember |
+----------+
|        2 |
|       37 |
|       38 |
|       47 |
|       53 |
|       63 |
|       64 |
|       76 |
+----------+
8 rows in set (0.05 sec)

My problem is how can i get the fkmember value and store it in array.

I have a query like this:

$query1 = "SELECT DISTINCT(fkmember) FROM points_ledger";
$result1 = $this->db->query($query1);
            
foreach($result1->result_array() as $row){
        
        //Need to get the value of fkmember and sore in array      

}

Because i want to create a two queries using the fkmember. That's all hope you can help me.


Messages In This Thread
Fetch value in query and store in array - by El Forum - 11-20-2012, 10:29 PM
Fetch value in query and store in array - by El Forum - 11-20-2012, 10:39 PM
Fetch value in query and store in array - by El Forum - 11-20-2012, 10:54 PM
Fetch value in query and store in array - by El Forum - 11-20-2012, 11:00 PM
Fetch value in query and store in array - by El Forum - 11-20-2012, 11:04 PM
Fetch value in query and store in array - by El Forum - 11-20-2012, 11:10 PM
Fetch value in query and store in array - by El Forum - 11-24-2012, 02:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB