Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using SQL Server, TRUE cannot be used in a select statement. This is seen in masquerade.module on line 765.
// Check to see if we need admin permission.
$results = db_query('SELECT TRUE FROM {masquerade_users} WHERE uid_from = :uid_from AND uid_to = :uid_to', array(
':uid_from' => $user->uid,
':uid_to' => $new_user->uid,
));
The patch attached replaces TRUE with 1.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1258376-query_exists.patch | 582 bytes | andypost |
0001-replaced-TRUE-with-1.patch | 862 bytes | sneyerst | |
Comments
Comment #1
andypostSuppose proper fix is taken from core node_type_save()
Comment #2
andypostrady to commit but needs to be tested on sql server
Comment #3
sneyerst CreditAttribution: sneyerst commentedI have tested your patch with success on a SQL Server database.
Didn't knew there was something like db_query_range().
Thank you for that and also for making this module SQL Server compatible. :-)
Comment #4
andypostThanx, commited
Comment #5.0
(not verified) CreditAttribution: commentedI had the patched version shown in the code-view. Replaced it with the current situation.