Hi. Ive just started to use php migrating from classic asp. on my webpage I am sending a string of characters in the variable $mask to a python file and sending it back as a dictionary. In php I am taking the first element of the dictionary and converting it back to a string and putting it in the variable $sqltxt.
This section of the code works fine and I can see the string contents and its data type on the webpage. The problem comes when I try to use the string as an SQL statement against the database. It returns an error.
Fatal error : Uncaught Error: Call to a member function fetchall() on boolean in C:\xampp\htdocs\Crossword\test.php:26 Stack trace: #0 {main} thrown in C:\xampp\htdocs\Crossword\test.php on line 26
However if I replace the contents of the sqltxt variable with a copy of the text from the webpage, it works fine! (see line 20). I am at a loss as to what is going wrong, can anyone help?
Thanks in advance.