(Im so sorry that this is trivial but i am using SQL/php for the first time, I tried looking at the answers on this site and various other sites/videos but i dont understand what is going wrong) I'm creating a quiz where the questions are in the form of images, so a random image from a table must be chosen and displayed. I looked at many websites and I am currently following this page:
https://www.sqlshack.com/upload-multiple-images-sql-server/
I created the table using this code (which works)
$sql = "CREATE TABLE IF NOT EXISTS photo_table (photo_name_col VARCHAR(30), varBinaryData VARBINARY(100000000))";
(i used 10000000 instead of max because it throws a syntax error when I use max.
when i follow the tutorial and try to insert images it throws a syntax error and asks me to check the correct syntax in the manual, but i read the manual and could not find anything
$sql2 = "INSERT INTO photo_table(photo_name_col, varBinaryData) VALUES('image1', (SELECT * FROM OPENROWSET (Bulk N'C:\xampp\htdocs\drunknet.jpg', SINGLE_BLOB) AS T1))";