Use thd_query_safe() to read query from a different connection.
Attach a file by drag & drop or click to upload