Search the Community
Showing results for tags 'confused'.
-
Hello PHP freaks Im trying to display table contents as Uploads or widrawals but would i have to create the functions inside the Widrawals and Uploads in order for it to be displayed in Overview table ? My code for overview table controller so far : By the way I'm using code igniter public function index() { $this->data['site']['currentNav'] = "account"; $query = $this->db->query("SELECT C.card_number AS `card_number` FROM `cards` C WHERE C.accountID = '". $this->account_id ."' AND C.status = '1'"); $this->data['cards'] = $query->result(); $query = $this->db->query("SELECT B.account_number AS `account_number`, B.sortcode AS `sortcode` FROM `banks` B WHERE B.accountID = '". $this->account_id ."' AND B.status = '1'"); $this->data['banks'] = $query->result(); $query = $this->db->query("SELECT T.transaction AS `transactionID`, T.timestamp AS `date`, IF(T.to = '". $this->account_id ."', 'Received', 'Sent') AS `type`, CONCAT(A.firstname, ' ', A.lastname) AS `name`, T.amount AS `amount` FROM `transactions` T JOIN `accounts` A ON (A.id = T.from) WHERE (T.to = '". $this->account_id ."' || T.from = '". $this->account_id ."') ORDER BY T.id DESC LIMIT 10"); $this->data['transactions'] = $query->result(); $this->load->view('_template/header', $this->data); $this->load->view('account/index', $this->data); $this->load->view('_template/footer', $this->data); }