I need a second pair of eyes
I'm trying to run this query below and I'm getting the following error:
PDO::query(): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT id=LAST_INSERT_ID()' at line 17 in /var/www/html/adminer.php on line 185
The query is:
INSERT INTO members ( member_id, first_name, middle_name, last_name, birth_date, spouse, spouse_birthday, phone_home,
phone_mobile, phone_work, employer, occupation, email, email2, related_father, related_grandfather, related_fatherinlaw,
related_uncle, related_brother, related_son, invited_by, street_address, neighborhood, city, province, postal_code, country,
ea_date, fc_date, mm_date, current_degree, appendant_bodies, available, overthrow, visited_lodges, believe_god, convicted,
conviction_reason, discussed_freemasonry, discussed_process, discussed_timeline, discussed_challenges, discussed_time,
bgcheck_approved, bgcheck_problem, firstvisit_date, secondvisit_date, thirdvisit_date, petition_date, petition_approved,
ballot_date, ballot_clear, proficiency_ea, proficiency_fc, proficiency_mm, heard_from, hope_tolearn, interview_br1, interview_br2,
interview_br3, interview_br4, interview_br5, interview_br6, lodgeinterview_date, homeinterview_date, comments, date_created,
is_active ) VALUES (
'2252229', 'Johnny', 'W', 'Doe', {d '1960-03-25'}, 'Jane Doe', '02/28', '', '407 555 1212', '305 555 1212',
'My Company Corp', 'Real Estate Agent', 'agent@mycompany.com', 'agent2@mycompany.com', 0, 0, 0, 0, 0, 0, '',
'1234 Main Street', 'Downtown', 'Orlando', 'FL', '32819', 'United States', {d '1997-08-05'}, {d '1997-12-13'},
{d '1997-12-13'}, 3, '', 1, 0, 1, 1, 0, '', 1, 1, 1, 1, 1, 1, '', null, null, null, null, 0, null, 1, {d '1997-08-30'},
{d '1997-12-30'}, {d '1997-12-30'}, '', '', '', '', '', '', '', '', null, null,
'', {ts '2021-03-02 21:38:18'}, 1
)
SELECT id=LAST_INSERT_ID();
Those fields with 0s and 1s are boolean. I already tried with true and false but got the same error.
Please help !!!
Thanks.