This is for PHP 8.2, ZC 1.5.8.

I'm trying to write an auto-installer for a custom product type but I'm having a problem with the product type layout insert. The idea is that I use the last insert ID from product_types and insert that into the `product_type_layout` table as needed. But everytime I do so using the "Install SQL patch" in the admin area, I get an error saying something akin to:

Code:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@insert_ID
Or something like

Code:
FUNCTION zencart.1LAST_INSERT_ID does not exist :: INSERT INTO jg1_product_type_layout (configuration_title, configuration_key, configuration_value, configuration_description, product_type_id, sort_order, last_modified, date_added, use_function, set_function) VALUES ('Show Model Number', 'SHOW_PRODUCT_CARDS_FAB_INFO_MODEL', '0', 'Display Model Number on Product Info 0= off 1= on', LAST_INSERT_ID(), 1, NOW(), NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'1\', \'text\'=>\'True\'),
Here is the SQL code I'm trying to use:

Code:
INSERT INTO `product_types`     (`type_name`, `type_handler`, `type_master_type`, `allow_add_to_cart`, `default_image`, `date_added`, `last_modified`) 
    VALUES 
    ('Cards - Flesh and Blood', 'product_cards_fab', '1', 'Y', '', NOW(), NOW());


INSERT INTO `product_type_layout` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `product_type_id`, `sort_order`, `last_modified`, `date_added`, `use_function`, `set_function`) VALUES ('Show Model Number', 'SHOW_PRODUCT_CARDS_FAB_INFO_MODEL', '0', 'Display Model Number on Product Info 0= off 1= on', LAST_INSERT_ID(), 1, NOW(), NOW(), NULL, 'zen_cfg_select_drop_down(array(array(\'id\'=>\'1\', \'text\'=>\'True\'), array(\'id\'=>\'0\', \'text\'=>\'False\')), '),
Should I just use a $db->Execute instead or run something like this directly in PHPMyAdmin?