Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getPort($id) {
- $sql = "SELECT c.id, c.port as number, d.type, d.spec, d.transfer as speed
- FROM details a
- LEFT JOIN port_to_drive b ON a.drive_id = b.drive_id
- LEFT JOIN port c ON b.port_id = c.id
- LEFT JOIN port_type d ON c.port_type = d.id
- WHERE a.id = $id";
- $stmt = $this->db->query($sql);
- return $stmt->fetchObject();
- }
- object(stdClass)[116]
- public 'id' => null
- public 'number' => null
- public 'type' => null
- public 'spec' => null
- public 'speed' => null
- PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
- PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
- PDO::ATTR_EMULATE_PREPARES => false
Add Comment
Please, Sign In to add comment