[eluser]Katsune[/eluser]
[EDITED]
Hi,
I cant figure out what's the right syntax for this:
Code:
[$session_username = $this->session->userdata('Username');
$sql = "SELECT UserID FROM username_table WHERE Username = '$session_username'";
$insertedUserID = $this->db->query($sql);
$shit = $insertedUserID->result_array();
print_r ($shit);
Whenever I run this the result is:
Code:
Array ( [0] => Array ( [UserID] => 1 ) )
But what I only need is the value 1 from the UserID column. How can I get that?
Can anyone tell me how to write the right syntax for the first code above?
Thanks,