Page 1 of 1

Error code 1054 in sql unknown colum

Posted: Tue Oct 25, 2011 9:48 am
by loadafile
Hi guys I hope you can help I have been working alot on my site and I seem to have hit a road block.

The script was purchased with alot of bugs that I managed to fix on my own. The only issue I have now is when a user wants to delete a folder.

http://www.loadafile.com

If you take a look you will see if you upload a file it will delete perfectly.

but if you go to the manage folders category, then add folder...then try to delete the folder you made you get a database error.


This is what my log shows

Code: Select all

==============================================================================
|| Request URI: /index.php/folders/delete?folder=1
|| Date: Tue Oct 25 07:18:40 2011
|| IP Address: xxxxxxxxx
|| Error: 1054 Unknown column 'folder_id' in 'where clause'
|| 
|| DELETE FROM files WHERE folder_id=1
|| array (
  0 => 
  array (
    'file' => '/home/content/54/6252454/html/library/database/mysql.php',
    'line' => 153,
    'function' => 'fatalError',
    'class' => 'Core_Database',
    'type' => '->',
    'args' => 
    array (
      0 => 1054,
      1 => 'Unknown column \'folder_id\' in \'where clause\'',
      2 => 'DELETE FROM files WHERE folder_id=1',
    ),
  ),
  1 => 
  array (
    'file' => '/home/content/54/6252454/html/controllers/folders.php',
    'line' => 124,
    'function' => 'query',
    'class' => 'Core_Database_mysql',
    'type' => '->',
    'args' => 
    array (
      0 => 'DELETE FROM %sfiles WHERE folder_id=1',
    ),
  ),
  2 => 
  array (
    'file' => '/home/content/54/6252454/html/controllers/folders.php',
    'line' => 56,
    'function' => '_delete',
    'class' => 'controller_folders',
    'type' => '->',
    'args' => 
    array (
    ),
  ),
  3 => 
  array (
    'file' => '/home/content/54/6252454/html/library/controller.php',
    'line' => 98,
    'function' => 'dispatch',
    'class' => 'controller_folders',
    'type' => '->',
  ),
  4 => 
  array (
    'file' => '/home/content/54/6252454/html/index.php',
    'line' => 27,
    'function' => 'initialize',
    'class' => 'Controller',
    'type' => '::',
    'args' => 
    array (
    ),
  ),
)

Re: Error code 1054 in sql unknown colum

Posted: Wed Nov 02, 2011 11:36 pm
by social_experiment
Can you paste the query that creates the error message?