Documentation

tab_tickets_times

Class tab_tickets_times

Represents the tab_tickets_times class for managing records in the tickets_times table.

Table of Contents

Properties

$allowedCols  : array<string|int, mixed>
$db  : db_tenant
Represents the database connection

Methods

__construct()  : void
Constructor method for the class.
__destruct()  : void
__destruct function.
checkifrunning()  : bool
delete()  : bool
Deletes a record from the "tickets_times" table based on the given value and column.
get()  : array<string|int, mixed>|bool
Retrieves the first record from the `tickets_times` table that matches the specified value and column.
getall()  : array<string|int, mixed>|bool
Retrieves all records from the `tickets_times` table that match the specified value and column.
insert()  : bool
Insert a new record into the 'tickets_times' table.
update()  : bool
Updates a record in the "tickets_times" table based on the given column, value, and ID.

Properties

$allowedCols

protected array<string|int, mixed> $allowedCols = ['id', 'tnumber', 'tmid', 'tech', 'type', 'start', 'end', 'contact', 'proviso', 'signature', 'signdate']

This variable represents the list of allowed column names for some operation. The column names that are allowed are:

  • id: Represents the ID column.
  • tnumber: Represents the TNumber column.
  • tmid: Represents the Tmid column.
  • tech: Represents the Tech column.
  • type: Represents the Type column.
  • start: Represents the Start column.
  • end: Represents the End column.
  • contact: Represents the Contact column.
  • proviso: Represents the Proviso column.
  • signature: Represents the Signature column.
  • signdate: Represents the Signature time

Methods

__destruct()

__destruct function.

public __destruct() : void

Unsets the "db" and "allowedCols" properties of the object.

checkifrunning()

public checkifrunning(string $val[, string $col = 'tnumber' ][, string $type = '-1' ]) : bool
Parameters
$val : string
$col : string = 'tnumber'
$type : string = '-1'
Return values
bool

delete()

Deletes a record from the "tickets_times" table based on the given value and column.

public delete(string $val[, string $col = 'tmid' ]) : bool
Parameters
$val : string

The value to match in the specified column. Must be a string.

$col : string = 'tmid'

The column to search for the value. Default value is 'tmid'.

Return values
bool

Returns true if a record was deleted, false otherwise.

get()

Retrieves the first record from the `tickets_times` table that matches the specified value and column.

public get(string $val[, string $col = 'tmid' ]) : array<string|int, mixed>|bool
Parameters
$val : string

The value to search for in the specified column.

$col : string = 'tmid'

The column to search in. Default value is 'tmid'.

Return values
array<string|int, mixed>|bool

Returns an array of the first record that matches the specified value and column, or false if the column is not allowed or no records were found.

getall()

Retrieves all records from the `tickets_times` table that match the specified value and column.

public getall(string $val[, string $col = 'tnumber' ]) : array<string|int, mixed>|bool
Parameters
$val : string

The value to search for in the specified column.

$col : string = 'tnumber'

The column to search in. Default value is 'tnumber'.

Return values
array<string|int, mixed>|bool

Returns an array of all records that match the specified value and column, or false if the column is not allowed or no records were found.

insert()

Insert a new record into the 'tickets_times' table.

public insert(string $tnumber, string $tmid, string $tech[, string $type = '0' ]) : bool
Parameters
$tnumber : string

The ticket number.

$tmid : string

The ticket mid.

$tech : string

The technician's name.

$type : string = '0'

The ticket type. Default is '0'.

Return values
bool

Returns true if the record is inserted successfully, otherwise false.

update()

Updates a record in the "tickets_times" table based on the given column, value, and ID.

public update(string $col, string $val, string $id) : bool
Parameters
$col : string

The column to update. Must be a string and exist in the table.

$val : string

The new value to set for the specified column. Must be a string.

$id : string

The ID of the record to update. Must be a string.

Return values
bool

Returns true if a record was updated successfully, false otherwise.


        
On this page

Search results