how odd in retrieving value

#1
[eluser]kikz4life[/eluser]
hi there CI community,

i have a problem. Im trying to retrieve just the userid in my table but it return me a blank value Sad

Code:
$cdt['userid'] = $user["userid"];
print_r($cdt);
print_r($user);

with print_r($user) it return me this values:
Code:
Array
(
    [cDivision] => PC001
    [UserID] => CGAMBOA
    [LastName] => GAMBOA
    [FirstName] => CRIS
    [MI] => P
    [Initials] =>  
    [RoleID] => CEO
    [DeptID] => ADMIN
    [Password] => 21232f297a57a5a743894a0e4a801fc3
    [PassErrCtr] => 0
    [Email] =>  
    [Phone] =>  
    [Locked] => 0
    [InUse] => 0
    [cTasksIDNo] =>  
    [Status] => 1
    [Modified] => 2008-02-20 00:00:00.0000000
    [Created] => 2008-02-20 00:00:00.0000000
    [deptid] => ADMIN
    [dDescription] => ADMINISTRATION AND FINANCE
    [roleid] => CEO
    [rDescription] => CEO
)

but with this print_r($cdt):
Code:
Array
(
    [userid] =>   //blank. Must return me the CGAMBOA value
)

Am i doing something not right here? hmmm. I just want to get the userid.
Any pointer will help.

Cheers
-Dean

#2
[eluser]Ivar89[/eluser]
It probably gives you a blank because[userid] IS in fact empty because it's actual name is [UserID]
Try and change some lowercase to uppercase??

#3
[eluser]kikz4life[/eluser]
haha, ur my light Ivar89

change it to this $cdt['userid'] = $user["UserID"]; and it work. haha
i've been querying using ms sql and it didn't bothered me using selecting columns in uppercase or lowercase. haha. thank you again ivar89.. owe you one

cheers
-Dean

#4
[eluser]Ivar89[/eluser]
npWink
I did it wrong a gazillion times toTongue


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.