[SOLVED] Database error 1054 - Unknown column 'owner'

Once you've installed phpList Version 2... ask questions here!
Forum rules
Please help the volunteers to help you by supplying the version of phpList you are using, browser & version and if possible, a link to your phpList installation. This is for Version 2 of phpList (the orange one).

[SOLVED] Database error 1054 - Unknown column 'owner'

Postby neur0 » 11:17am, Fri 16 Nov, 2012

Hi all,

My PHPList instalation is working fine, but when I added an additional admin account and set up the permissions I wanted, every time this restricted admin deletes a list, an error appears:

Code: Select all
Database error 1054 while doing query Unknown column 'owner' in 'where clause'


Other than that, everythig seems to be working and the dbcheck says everything is OK.

Here are the list permissions for this user:
Code: Select all
list   editlist owner
list   members  owner
list   list     owner


version 2.10.19

I wouldn't mind it, it's just that it could alarm the non-technical people who are going to use this account.
Last edited by neur0 on 3:40pm, Fri 16 Nov, 2012, edited 1 time in total.
neur0
phpList newbie
 
Posts: 2
Joined: 10:54am, Wed 01 Aug, 2012

Re: Database error 1054 - Unknown column 'owner'

Postby duncanc » 12:42pm, Fri 16 Nov, 2012

There is an error in the phplist code when deleting a list by an admin with 'owner' access.

See file admin/list.php lines 42,43
Code: Select all
    $result = Sql_query('delete from '.$tables['listuser']." where listid = $delete $subselect_and");
    $result = Sql_query('delete from '.$tables['listmessage']." where listid = $delete $subselect_and");


Change them to
Code: Select all
    $result = Sql_query('delete from '.$tables['listuser']." where listid = $delete");
    $result = Sql_query('delete from '.$tables['listmessage']." where listid = $delete");
duncanc
Moderator
 
Posts: 2440
Joined: 6:34am, Sat 08 May, 2010
Location: London

Re: Database error 1054 - Unknown column 'owner'

Postby neur0 » 3:36pm, Fri 16 Nov, 2012

Thanks,

This fixed it.
neur0
phpList newbie
 
Posts: 2
Joined: 10:54am, Wed 01 Aug, 2012


Return to Question & Problems - after installing

Who is online

Users browsing this forum: No registered users and 2 guests

cron