How not to get selected data |
Hi, I have my code below I would like to be able to use 'users.*' to be able to get the users data how ever is there a way in select not to get the password but gets the all of other data.
Currently it gets all users data include password. I don't want it do get password. PHP Code: public function get_user($column = '', $id = '')
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
You would need to specify the fields something like below.
Code: SELECT tbl_a.column1 , tbl_a.column2 What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(07-06-2017, 03:07 AM)InsiteFX Wrote: You would need to specify the fields something like below. I know all that was wondering if just can use users.* only and have a some thing in there not to get password other wise I will just have to do it the long way.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
There is no "reverse" select that I know of.
It is recommended to always use the field names. Its good practice NOT to use the * in the select. The * is more for the newbie programmers that dont know any better. (There are of course exceptions where * is perfectly legitimate)
On the package it said needs Windows 7 or better. So I installed Linux.
You could always just unset the item:
PHP Code: $result = $user_query->row_array(); However, I would prefer to just select the columns I need rather than do the above.
(07-06-2017, 10:12 AM)PaulD Wrote: You could always just unset the item: Thanks for that.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
Strictly speaking, who cares if password is return, it is "encrypted" in db, correct?
|
Welcome Guest, Not a member yet? Register Sign In |