It looks like the ODBC connection is working based on
ERROR: ODBC: State 42522: [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.24]Unknown column '12' in 'field list'
but as I have not used MySQL with ODBC I would start from the ground up in resolving this problem.
Check the ODBC configuration using iusql.
When I created a Wiki for using ODBC with PostgreSQL it starts with checking the ODBC configuration using iusql. You should be able to do the same but instead using your ODBC configuration. If you are not on Linux then you should find a similar tool.
Check ODBC connection using the SWI-Prolog DSN configuration.
The wiki also has some simple test cases. You should be able to create similar queries and get similar results using MySQL.
Check your Prolog quires without using MySQL.
Add some guard statements using must_be/2 for the quires connecting to MySQL, e.g.
There is not much more help I can give you than this without installing MySQL which is not on my task list for the day.
Also please translate the error messages in images into text as it makes it better for others seeking help on the same problem and makes it easier for us helping you to read the full error message.
I’ve just realised it worked in other mysql I had, so it MUST have been doing something wrong in between the MYSQL and ODBC/SWI Prolog.
I’m sorry for taking your time, I’m basically new in this world.
fixed: I tried to consult the file from a txt with .pl and then worked from there, now it’s fixed. Really sorry for your time! and thank you, I’ve learned more from your post.
Now i’ll just search for a way to get the average with just 2 decimals jaja
I assure you, you did not waste my time. If I didn’t want to take the time to answer this I would have not.
Just yesterday I noted to someone that I see them being smarter for asking a question then spending days to years for not asking out of fear.
Your question has most of what was needed to give a reasonable answer and is easily understood. If I had MySQL installed I could have given more details.
You also get brownie points for replying back and giving useful information.
This site is hosted for free with certain limitations, one of them being a limited amount of storage space. The use of images uses a lot of storage space. Often images can have a low signal to storage ratio and so it is preferred that the information be extracted from them and converted into a format using less storage.
While we keep an eye on this at some time in the future we may have to start pruning images without consent. These images would be high on the prune list.
While I agree that the images were helpful for your question they really should be converted to something using orders of magnitude less storage space.