CodeIgniter Forums
select user by user_id - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: select user by user_id (/showthread.php?tid=73907)



select user by user_id - kosteloos - 06-22-2019

Hello everyone, here I am, facing a problem.

voice ma bdd:

id user_id currency_id currency_id currency_symbol balance last_update
25 AKWEYR 817014 KST 0.000000000000 2019-06-22 17:40:31
26 AKWEYR 1182 BTC 0.0000000000 2019-06-19 17:54:12
31 OWONWR 817014 KST 0.000000000000 2019-06-22 17:40:21
32 OWONWR 1182 BTC 0.0000000000 2019-06-20 17:53:43

I'm looking to display balance when currency_symbol = KSD and user_id = AKWEYR

I have tried a lot of things but nothing works
thank you in advance.

Translated with www.DeepL.com/Translator


RE: select user by user_id - jreklund - 06-22-2019

We could give you a correct answer, but if we do; You won't learn on the way there.

What have you tried? And what did you get? (if you got anything)

Selecting Data
Looking for Specific Data
Method Chaining


RE: select user by user_id - InsiteFX - 06-23-2019

Database where


RE: select user by user_id - Wouter60 - 06-23-2019

Quote:id user_id currency_id currency_id currency_symbol balance last_update
25 AKWEYR 817014 KST 0.000000000000 2019-06-22 17:40:31
26 AKWEYR 1182 BTC 0.0000000000 2019-06-19 17:54:12
31 OWONWR 817014 KST 0.000000000000 2019-06-22 17:40:21
32 OWONWR 1182 BTC 0.0000000000 2019-06-20 17:53:43

I'm looking to display balance when currency_symbol = KSD and user_id = AKWEYR

I have tried a lot of things but nothing works

Are you sure there must be records in your table with currency symbol "KSD"? In the example you included, I only see "KST". So that would explain why you don't get any results. But like jreklund says: it's hard to tell without knowing what you already tried.