You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Orm.php
-18Lines changed: 0 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,11 @@
5
5
class Orm
6
6
{
7
7
/**
8
-
<<<<<<< HEAD
9
8
* Inserts a new record into the specified table.
10
9
*
11
10
* @param string $tableName The name of the table to insert into.
12
11
* @param array<string, ?string> $object An associative array representing the record to insert, where keys are column names and values are the corresponding values.
13
12
* @return int The ID of the newly inserted record. If no fields are provided, returns 0.
publicstaticfunctioninsert(string$tableName, array$object): int
19
15
{
@@ -35,17 +31,13 @@ public static function insert(string $tableName, array $object): int
35
31
}
36
32
37
33
/**
38
-
<<<<<<< HEAD
39
34
* Updates an existing record in the specified table by its ID.
40
35
*
41
36
* @param string $tableName The name of the table to update.
42
37
* @param array<string, ?string> $object An associative array representing the record to insert, where keys are column names and values are the corresponding values.
43
38
* @param string|int $id The ID of the record to update.
44
39
* @param string $idField The name of the ID field (default is 'id').
45
40
* @return bool Returns true if the update was successful, false otherwise.
@@ -73,16 +65,12 @@ public static function update(string $tableName, array $object, string|int $id,
73
65
}
74
66
75
67
/**
76
-
<<<<<<< HEAD
77
68
* Selects a record from the specified table by its ID.
78
69
*
79
70
* @param string $tableName The name of the table to select from.
80
71
* @param string|int $id The ID of the record to select.
81
72
* @param string $idField The name of the ID field (default is 'id').
82
73
* @return array<string, ?string> $object An associative array representing the selected record, where keys are column names and values are the corresponding values. If no record is found, an empty array is returned.
0 commit comments