appointments
in package
Class Appointments
Table of Contents
Properties
- $tab_tickets_appointments : tab_tickets_appointments
- The $tab_tickets_appointments object is used to interact with the tickets_appointments table.
Methods
- __construct() : mixed
- Constructor for the class.
- __destruct() : void
- Destroys the object and releases allocated resources.
- delete() : bool
- Deletes a record from the table.
- generatedataforcalitem() : array<string|int, mixed>|bool
- get() : array<string|int, mixed>|bool
- Gets a record from the tab_tickets_appointments table based on the provided parameters.
- getall() : array<string|int, mixed>|bool
- Gets all records from the tab_tickets_appointments table based on the provided parameters.
- insert() : string|int|bool
- Inserts a new record into the tab_tickets_appointments table.
- sendcal() : bool
- update() : bool
- Updates a record in the table.
Properties
$tab_tickets_appointments
The $tab_tickets_appointments object is used to interact with the tickets_appointments table.
protected
tab_tickets_appointments
$tab_tickets_appointments
Methods
__construct()
Constructor for the class.
public
__construct() : mixed
Initializes the tab_tickets_appointments object.
__destruct()
Destroys the object and releases allocated resources.
public
__destruct() : void
This method unsets the $tab_tickets_appointments
property,
releasing any allocated memory and resources associated with it.
delete()
Deletes a record from the table.
public
delete(string $val[, string $col = 'tid' ]) : bool
Parameters
- $val : string
-
The value to match for deleting the record.
- $col : string = 'tid'
-
The column to match for deleting the record. Defaults to 'tid'.
Return values
bool —Returns true if the record was successfully deleted, false otherwise.
generatedataforcalitem()
public
generatedataforcalitem(string $aid) : array<string|int, mixed>|bool
Parameters
- $aid : string
Return values
array<string|int, mixed>|boolget()
Gets a record from the tab_tickets_appointments table based on the provided parameters.
public
get(string $val[, string $col = 'tid' ]) : array<string|int, mixed>|bool
Parameters
- $val : string
-
The value to search for.
- $col : string = 'tid'
-
The column to search in. Default is 'tid'.
Return values
array<string|int, mixed>|bool —Returns an array representing a single record if found, or false if no record was found.
getall()
Gets all records from the tab_tickets_appointments table based on the provided parameters.
public
getall(string $val[, string $col = 'tid' ][, string $sort = 'start' ][, string $order = 'DESC' ]) : array<string|int, mixed>|bool
Parameters
- $val : string
-
The value to search for.
- $col : string = 'tid'
-
The column to search in. Default is 'tid'.
- $sort : string = 'start'
-
The column to sort by. Default is 'start'.
- $order : string = 'DESC'
-
The sort order. Default is 'DESC'.
Return values
array<string|int, mixed>|bool —Returns an array of records if successful, or false if there was an error.
insert()
Inserts a new record into the tab_tickets_appointments table.
public
insert(string $tid, string $tnumber, string $start[, string $dur = '15' ][, string $type = '0' ]) : string|int|bool
Parameters
- $tid : string
-
The ticket ID.
- $tnumber : string
-
The ticket number.
- $start : string
-
The start time of the appointment.
- $dur : string = '15'
-
The duration of the appointment. Default is '15'.
- $type : string = '0'
-
The type of appointment. Default is '0'.
Return values
string|int|bool —Returns the ID of the newly inserted record if successful, or false if there was an error.
sendcal()
public
sendcal(string $aid) : bool
Parameters
- $aid : string
Return values
boolupdate()
Updates a record in the table.
public
update(string $col, string $val, string $id) : bool
Parameters
- $col : string
-
The column to update.
- $val : string
-
The new value for the column.
- $id : string
-
The identifier of the record to update.
Return values
bool —Returns true if the record was successfully updated, false otherwise.