Person model

OpensourcePOS · application/models/Person.php · php · MIT
database, crm, tag:people-model

Core person data model supporting customers, employees, and suppliers with common attributes.

// Source: https://github.com/smills323/OpensourcePOS | License: MIT | Copyright 2012-2014 pappastech
// Provided via justclaw.it.com; keep this notice with the code.
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Base class for People classes
 */

class Person extends CI_Model
{
	/**
	 * Determines whether the given person exists in the people database table
	 *
	 * @param integer $person_id identifier of the person to verify the existence
	 *
	 * @return boolean TRUE if the person exists, FALSE if not
	 */
	public function exists($person_id)
	{
		$this->db->from('people');
		$this->db->where('people.person_id', $person_id);

		return ($this->db->get()->num_rows() == 1);
	}

	/**
	 * Gets all people from the database table
	 *
	 * @param integer $limit li

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key