Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $_data = array(
- 'firstname' => 'Janez',
- 'lastname' => 'Novak',
- 'address' => 'Dunajska 11',
- 'zip' => 1111,
- 'post' => 'Ljubljana'
- );
- $customer = new Customer( $_data );
- // save to db
- $customer = $customer->create();
- $id = $customer->id;
- // read from db
- $customer->read( $id );
- // update to db
- $customer->update( $id, array(
- 'firstname' => 'Bostjan'
- ));
- // delete from db
- $customer->delete( $id );
- // read all from db and return customer object
- $customers = $customer->readAll();
- dump( $customers );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement