# wpdirectorykit/1.2.3/application/models/Locationslistings_m.php

WP Directory Kit, version 1.2.3. 43 lines.

- Page: https://pluginprobe.com/plugins/wpdirectorykit/1.2.3/code/application/models/Locationslistings_m.php
- Raw: https://pluginprobe.com/plugins/wpdirectorykit/1.2.3/raw/application/models/Locationslistings_m.php
- Modified: 2023-05-25T15:09:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wpdirectorykit/1.2.3/code/application/models/Locationslistings_m.php#L10-L20`.

```php
<?php

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

class Locationslistings_m extends Winter_MVC_Model {

	public $_table_name = 'wdk_listings_locations';
	public $_order_by = 'post_id DESC';
    public $_primary_key = 'post_id';
    public $_own_columns = array();
    public $_timestamps = FALSE;
    protected $_primary_filter = 'intval';
    public $form_admin = array();
    public $fields_list = NULL;
    
	public function __construct(){
        parent::__construct();
	}

    public function delete_where($where)
    {
        $this->db->where($where);
        $this->db->delete($this->_table_name);
    }

        
    public function get_locations($post_id = NULL, $single = FALSE)
    {
        $this->load->model('location_m');
        $locations_table = $this->location_m->_table_name;

        $this->db->from($this->_table_name);
        $this->db->join($locations_table.' ON '.$locations_table.'.idlocation = '.$this->_table_name.'.location_id');

        return parent::get($post_id, $single);
    }
    

}
?>
```
