Welcome to the forum, Guest

To access forum content and all of our services, you must register or log in to the forum. Joining the forum and all content on the forum is completely free.

The world's largest FiveM Forum and GTA 5 Forum address

Hello dear member,
We work 24/7 to provide the most valuable content that will be of use to you,
you can share content and support the entire FiveM & GTA 5 community.

Question SQL request: error parsing script

JordanPANDA

Designer
Joined
Sep 3, 2021
Messages
43
Reaction score
16
Points
61
Location
france
Hello dear VAG community,

I have a little problem and i'm not that good on SQL so i wanted to ask how to solve this,
My problem is that i have a SQL insert that use the caractere : "apostrophe"/"single quote mark" and wanted to know how to avoid that

here is a sample:
SQL:
INSERT INTO `phone_messages` (`identifier`, `number`, `messages`) VALUES

('steam:110000144f3db60', '233907', '[
    {"date":"14-8-2021","messages":[
        {"message":"test","data":[],"time":"15:36","type":"message","sender":"steam:110000144f3db60"},
        {"message":"J'ai ","data":[],"time":"15:36","type":"message","sender":"steam:110000144f3db60"}
        ]
    }
]');


the error:
Code:
[  script:mysql-async] [MariaDB:10.5.10-MariaDB-log] [ERROR] [qb-phone_deluxe] An error happens for query

"INSERT INTO `phone_messages` (`identifier`, `number`, `messages`) VALUES
('steam:110000144f3db60', '233907', '[
    {"date":"14-8-2021","messages":[
        {"message":"test","data":[],"time":"15:36","type":"message","sender":"steam:110000144f3db60"},
        {"message":"J'ai ","data":[],"time":"15:36","type":"message","sender":"steam:110000144f3db60"}
        ]
    }
]'
') : []": ER_PARSE_ERROR: 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 'ai ","data":[],"time":"15:36","type":"message","sender":"steam:110000144f3db6...' at line 1


If you need the LUA or something just ask

Thanks all for the futur help​
 

Login or register to get more out of the forum!

Login or register to get more out of the forum!

Register

Creating an account on the forum is completely free.

Register now
Log in

If you have an account, please login

Log in

Theme editor

Theme customizations

Graphic Backgrounds

Granite Backgrounds