• Resolved uli2000

    (@uli2000)


    The following query gives a syntax error in the query builder, while when I run this in phpmyadmin it works fine.

    START TRANSACTION;
    INSERT INTO wp_4_frm_items (item_key, form_id, post_id, user_id, parent_item_id, is_draft, updated_by, created_at, updated_at)
    SELECT guid, 3 as form_id, 0 as post_id, 1 as user_id, 0 as parent_item_id, 0 as is_draft, 1 as updated_by, Now() as created_at, Now() as updated_at FROM reparaturo_repair_status
    ON DUPLICATE KEY
    UPDATE id=id;
    COMMIT;

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter uli2000

    (@uli2000)

    All resolved with

    DELIMITER $$
    DROP PROCEDURE IF EXISTS sp_repair_status$$
    CREATE PROCEDURE sp_repair_status()
    BEGIN

Viewing 1 replies (of 1 total)

The topic ‘Syntax Error with Begin or Start transaction in Query Builder’ is closed to new replies.