Complete market occurrence drawer details
This commit is contained in:
1 parent
16882207bb
commit
278e415e08
4 files changed
+57
-2
No files matched your search
@@ -125,6 +125,32 @@ function get_manufacturer_options(PDO $pdo): array
|
||||
);
|
||||
}
|
||||
|
||||
function get_party_reference(PDO $pdo, int $partyId): ?array
|
||||
{
|
||||
$stmt = $pdo->prepare(
|
||||
'SELECT id, name, email, phone
|
||||
FROM party
|
||||
WHERE id = :id'
|
||||
);
|
||||
$stmt->execute([':id' => $partyId]);
|
||||
$party = $stmt->fetch();
|
||||
|
||||
return is_array($party) ? $party : null;
|
||||
}
|
||||
|
||||
function get_contact_reference(PDO $pdo, int $contactId): ?array
|
||||
{
|
||||
$stmt = $pdo->prepare(
|
||||
'SELECT id, party_id, first_name, last_name, email, phone, position_title
|
||||
FROM contact
|
||||
WHERE id = :id'
|
||||
);
|
||||
$stmt->execute([':id' => $contactId]);
|
||||
$contact = $stmt->fetch();
|
||||
|
||||
return is_array($contact) ? $contact : null;
|
||||
}
|
||||
|
||||
function create_manufacturer(PDO $pdo, string $name, ?string $email = null, ?string $phone = null): array
|
||||
{
|
||||
$name = trim($name);
|
||||
|
||||
Reference in new issue
Block a user