forked from inoerp/inoERP
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
7,476 additions
and
31 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
class view_path extends dbObject{ | ||
public static $table_name = "view_path"; | ||
public static $primary_column = "view_path_id"; | ||
public static $parent_primary_column = "view_id"; | ||
// data base variables as stored database column name | ||
public $field_a = [ | ||
"column_name", | ||
"path", | ||
"description", | ||
"view_id" | ||
]; | ||
//variables used for showing data | ||
|
||
public $initial_search = [ | ||
"column_name", | ||
"path", | ||
"description", | ||
]; | ||
|
||
public $column = [ | ||
"column_name", | ||
"path", | ||
"description", | ||
]; | ||
|
||
public $requiredField = [ | ||
"column_name", | ||
"path", | ||
"description", | ||
]; | ||
|
||
|
||
public $view_path_id; | ||
public $view_id; | ||
public $column_name; | ||
public $path; | ||
public $description; | ||
public $msg; | ||
|
||
|
||
public static function find_by_view_id($view_id) { | ||
$sql = " SELECT * FROM " . self::$table_name; | ||
$sql .= " WHERE view_id = '{$view_id}'"; | ||
$result = self::find_by_sql($sql); | ||
return $result; | ||
} | ||
|
||
public static function find_by_columnName_viewId($column_name,$view_id) { | ||
$sql = " SELECT * FROM " . self::$table_name; | ||
$sql .= " WHERE view_id = '{$view_id}'"; | ||
$sql .= " AND column_name = '{$column_name}' "; | ||
$sql = ino_perPageSql_i($sql, 1); | ||
$result_array = self::find_by_sql($sql); | ||
return !empty($result_array) ? array_shift($result_array) : false; | ||
} | ||
|
||
} | ||
|
||
//end of view class | ||
?> |
Oops, something went wrong.