Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function get_dimprofiles()
- {
- if(isset($_GET['kp'])) {
- $sql = "SELECT id, Name from DimProfile order by Name";
- $this->run_query($sql, null, null, PDO::FETCH_KEY_PAIR);
- }
- elseif(isset($_GET['filter'])) {
- $sql = "SELECT distinct DimProfile.id as id, DimProfile.Name as Name, Town_id from Devices
- left join `DimProfile` on `DimProfile`.id = Devices.DimProfile_id
- order by DimProfile.Name
- ";
- $this->run_query($sql);
- }
- else {
- $sql = "SELECT * from DimProfile order by name";
- $this->run_query($sql);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement