Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Enhancements to DBObject class #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tiagosiebler
Copy link

Summary

  • Removed hardcoded ID column name, with option to externally provide in constructor.
  • Added helper functions: __isset, __unset, isSetup, dictionary.
  • Replaced select function with one that allows a select query with multiple conditions, rather than just one. This is for situations where a single WHERE condition is not enough to retrieve a single row.

Examples

  • Previously, one which condition:
$o = new Order();
$o->select($a->serial_number, 'serial_number');
//select(value,column_name)
  • With multiple conditions:
$o = new Order();
$o->select($a->serial_number, 'serial_number', $a->item_name, 'item_name');
//select(column1_value, column1_name, ..., ..., column99_value, column99_name)

- Removed hardcoded ID column name, with option to externally provide in constructor.
- Added helper functions: __isset, __unset, isSetup, dictionary.
- Replaced select function with one that allows a select query with multiple conditions, rather than just one. This is for situations where a single WHERE condition is not enough to retrieve a single row.

== Examples
Previously, one which condition:
$o = new Order();
$o->select($a->serial_number, 'serial_number');

With multiple conditions:
$o = new Order();
$o->select($a->serial_number, 'serial_number', $a->item_name, 'item_name');
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant