I wrote the following query in Drupal6.
$sql =
"SELECT registryvalue
FROM {muln_registry}
WHERE fk_applicationid = %d
AND registrykey = '%s'";
$result = db_result(db_query($sql, 32, 'SHOW_SCORE_TO_STUDENT'));
It is supposed to return a value of 1. But it does not display anything. If I copy and run in mysql editor, it returns correctly.
But now he gives an empty. There are no errors in connecting to the database, etc. Since other queries work fine.
What could be a mistake here?
source
share