Sub request in where - 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: Sub request in where (/showthread.php?tid=72487) |
Sub request in where - xenos92 - 12-27-2018 Hello, I come to you because I need help on request ... I have a rank table that lists all the ranks available to a player with the maximum number of points for the rank. I have another table users who list my players with their experience. I want to use the experience of players to display the rank corresponding to the experience. Example : [b]rank table[/b] | id | grade | point | __________________________ | 1 | Niveau 1 | 300 | | 2 | Niveau 2 | 600 | users table | id | name | experience | ______________________________ | 1 | test | 330 | So if my player has an experience of 330 I need to display a level of 2 because above 300 and below 600. PHP Code: /* RE: Sub request in where - php_rocs - 12-28-2018 @xenos92, Will the rank table always be dynamic or are there set from and to values for each level? Is this a MySQL database? RE: Sub request in where - badger - 12-28-2018 how about Code: function rankedplayers() RE: Sub request in where - xenos92 - 12-28-2018 Thank you badger |