Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Help! with database problem

    Tried installing a module 9product expire) which has messed up my database. I now have a message which reads:

    1054 Unknown column 'products_bundle' in 'field list'
    in:
    [select products_quantity ,products_bundle from fws_products where products_id = '73']

    How can I resolve this? Restoring the DB doesn't seem to do it.

    Any urgent help much appreciated.

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Help! with database problem

    So you took a copy of database BEFORE installing mod?
    If so, delete existing and replace with copy taken..

  3. #3
    Join Date
    Jan 2008
    Posts
    43
    Plugin Contributions
    0

    Default Re: Help! with database problem

    Were there any database modifications that the add-on required you to make, but you didn't?

    That error means it's looking for a table in a database, but that table isn't there.

    Looks like, if you tried to uninstall the add-on, that some or all files of the add-on are still in place on your site and looking for that table. Otherwise, if you've installed the mod but not uninstalled it, you didn't make the necessary adjustments to your database when installing the add-on.

  4. #4
    Join Date
    Jun 2009
    Location
    Brisbane, QLD AUS
    Posts
    210
    Plugin Contributions
    0

    Default Re: Help! with database problem

    Quote Originally Posted by Diavire View Post
    ...That error means it's looking for a table in a database, but that table isn't there...
    don't you mean looking for a field in the table...

    either way, the field cannot be found. best bet would be to rollback if you can by removing the mod, and reinstalling, following instructions to the letter.

    sounds to me like you have missed an sql statement that should've been executed through the sql patches facility or similar.

    cheers
    andy

  5. #5
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Help! with database problem

    Quote Originally Posted by enquirer66 View Post
    Tried installing a module 9product expire) which has messed up my database. I now have a message which reads:

    1054 Unknown column 'products_bundle' in 'field list'
    in:
    [select products_quantity ,products_bundle from fws_products where products_id = '73']

    How can I resolve this? Restoring the DB doesn't seem to do it.

    Any urgent help much appreciated.
    Contrary to other replies (so far), and your assumption, this isn't actually a database problem, and restoring the database will not only not fix the problem, but could also CAUSE the problem.

    Instead of restoring the database you should be running any SQL scripts that came with the package that you installed.

    In simple terms, this is what is happening:

    The module you installed requires the addition or modification of one or more of the .php files. These additions/modifications is what is causing the error message that you are getting. It is doing this because the table/field that they need to access don't exist in the database, usually because the installation SQL hasn't been run (to create the table/fields) ... or, when the database gets restored *without* these tables/fields.

    If these fields do exist, the .php scripts that were installed/modified wouldn't be 'complaining'. Furthermore since no other piece of code will be accessing these new fields then *they* won't complain either (in other words, new fields added to a database generally won't cause a problem unless the code accessing the database has been very poorly written).

    So, you have two solutions.

    1. Finish the installation of the module by running any install.sql scripts that came with it. or

    2. Remove or re-edit the .php files that were installed/edited when you installed the module.

    There is no need to remove any new tables or fields created by a module, even if you uninstall the module itself.

    My personal recommendation is that since you've already donethe 'hard' bit of putting the .php files into their correct locations, then why not finish the installation off before giving up on it? (please note, I am not familiar with particular module). My comments are based on the basic principle of how all modules (and databases) work.

    Cheers
    Rod

  6. #6
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Re: Help! with database problem

    Thanks. It has been easier to try and uninstall the files and I agree it can cause more problems than it is worth restoring a DB. However, what is calling for a field that doesn't exist in the checkout? This is the problem I am left with: 1054 Unknown column 'products_bundle' in 'field list'
    in:
    [select products_quantity ,products_bundle from fws_products where products_id = '40']

    Is this a field which is being called that no longer exists or is this a field which was created in the DB which which is no longer being filled? I can't find the field in the DB using phpMyADmin, so it must be the other. But I have tried uninstalling all of the php files but something is still being called - how is this possible?

    I've looked for the string 'products_bundle' using the Developers Toolkit but there is nothing that matches..

  7. #7
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Re: Help! with database problem

    By the way this is the error message when a client hits the 'Add to Cart' button.

  8. #8
    Join Date
    Sep 2007
    Posts
    215
    Plugin Contributions
    0

    Default Re: Help! with database problem

    So I installed a newer version of the module - and it's now OK. Very strange however. Thanks for your help

  9. #9
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Help! with database problem

    Quote Originally Posted by enquirer66 View Post
    [select products_quantity ,products_bundle from fws_products where products_id = '40']

    Is this a field which is being called that no longer exists
    It either no longer exists (data restored from an older backup), or it never existed in the first place (sql installation script wasn't run, or the table prefix wasn't set correctly).

    Quote Originally Posted by enquirer66 View Post
    or is this a field which was created in the DB which which is no longer being filled?
    As per my previous message, having additional fields (fields that are never referenced) in a database isn't going to cause any problems.

    Quote Originally Posted by enquirer66 View Post
    I can't find the field in the DB using phpMyADmin,
    You won't. THAT IS WHY YOU ARE GETTING THE ERROR MESSAGE!!

    Quote Originally Posted by enquirer66 View Post
    But I have tried uninstalling all of the php files
    My suggestion to finish the installation will probably be easier, but do it your way if wish.

    Quote Originally Posted by enquirer66 View Post
    but something is still being called - how is this possible?
    Again, as per my previous response, you either haven't uninstalled all of the .php files that were installed by the module, OR you haven't reverted the modifications it performed on existing files. It can't be anything else.

    Quote Originally Posted by enquirer66 View Post
    I've looked for the string 'products_bundle' using the Developers Toolkit but there is nothing that matches..
    Did it ever occur to you that the developers toolkit may not be searching all files, or that you only told it to search for functions or constants, or some other filter type.

    Quote Originally Posted by enquirer66 View Post
    but something is still being called - how is this possible?
    It isn't possible, Therefore one (or more) of the .php files installed by the module hasn't been removed, or one (or more) of the .php files that it modified is yet to be restored to its pre-modified state.

    I shall again repeat my suggestion, you will probably find it easier to complete the installation than it would be to uninstall it (assuming you have already placed the .php files into their correct locations). All you need to is run the sql script that updates the database,

    If you feel you must uninstall then you need to find the .php file(s) that reference this field. If you don't find it/them then you simply aren't looking in the right place(s).


    Cheers
    Rod
    Last edited by RodG; 17 Dec 2009 at 03:14 PM.

 

 

Similar Threads

  1. Problem with Database
    By hellsanjeev in forum Installing on a Windows Server
    Replies: 2
    Last Post: 9 Oct 2009, 11:31 AM
  2. Help with database problem.
    By chalfontgifts in forum General Questions
    Replies: 1
    Last Post: 27 Sep 2008, 04:57 PM
  3. Problem with database upgrade v1.3.7 to 1.3.8
    By taz79 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 14
    Last Post: 2 Apr 2008, 09:57 PM
  4. problem with database upgrade
    By billt in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 14 Jan 2008, 10:39 PM
  5. Problem with database
    By rxalex in forum General Questions
    Replies: 2
    Last Post: 25 Jun 2006, 05:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg