Im trying to do a sub-query and I'm getting the $txt['database_error'] and $txt['try_again'] message. If I remove the modSettings lines, i get Hacking Attempt. I tried to remove lines 383-385 of my Subs-DB-mysql.php file but I'm still getting the same error.
global $modSettings;
$disableQueryCheckBack = $modSettings['disableQueryCheck'];
$modSettings['disableQueryCheck'] = true;
$queryexp = $smcFunc['db_query']('', "
SELECT *
FROM
(
SELECT *
FROM {db_prefix}exped_seguim
WHERE id_usuario = 83
) AS t
RIGHT JOIN {db_prefix}exped AS expe ON (t.id_exp =
expe.id_exped");
$modSettings['disableQueryCheck'] = $disableQueryCheckBack;
Is something wrong with the query? How can I do it? Maybe not using $smcFunc['db_query']? What should I do?
Thanks.
You have it right with $modSettings['disableQueryCheck'] = true;
You have a bug with your SQL you are missing a )
after RIGHT JOIN {db_prefix}exped AS expe ON (t.id_exp =
expe.id_exped
Quote from: vbgamer45 on July 25, 2020, 10:54:36 AM
You have it right with $modSettings['disableQueryCheck'] = true;
You have a bug with your SQL you are missing a )
after RIGHT JOIN {db_prefix}exped AS expe ON (t.id_exp =
expe.id_exped
Thanks... I can sleep now... Im very dumb
Thanks
I don't understand why this even needs a subquery in the first place.