In my database, I use the prefix 'drupal_' for all tables, to keep them seperated from other tables that are used for other purposes in the database. Upon installing profile_csv, I started getting the following error when trying to use it:

Unknown column 'users.uid' in 'field list' query: SELECT users.uid , users_roles.rid FROM drupal_users INNER JOIN drupal_users_roles ON users.uid = users_roles.uid WHERE users.uid > 1

This is fixed by changing the query around line 121 to the following:

    $result = db_query("SELECT u.uid , ur.rid  FROM {users} as u
	    INNER JOIN {users_roles} as ur ON u.uid = ur.uid
	    WHERE u.uid > 1");

I have also provided a patch that fixes this issue.

CommentFileSizeAuthor
profile_csv.patch345 bytestimothyf

Comments

wafaa’s picture

fixed for HEAD and 4.7

wafaa’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)