View Full Version : mysql error unknown column 'product' in vbfields
memcinto
Fri 18th Apr '08, 5:48pm
We are using ImpEx to bring in new users from a txt file to an existing system (so merge). Source is txt file, target is vBulletin 3.6.9. Module was the first (check database) of two, after giving it the full path name to the text file:
"Altering tables
ImpEx will now Alter the tables in the vB database to include import id numbers."
[list of tables snipped]
"There seems to have been a problem with the database.
ImpEx Database errormysql error: Invalid SQL:
SELECT fieldname, vbmandatory, defaultvalue, dictionary
FROM vb3_vbfields
WHERE tablename = 'usergroup'
AND product='vbulletin'
ORDER BY vbmandatory
mysql error: Unknown column 'product' in 'where clause'
mysql error number: 1054
Date: Friday 18th 2008f April 2008 01:39:47 PM
Database: vbforum_test
MySQL error: Unknown column 'product' in 'where clause'
FYI, our table prefix is vb3_. I took a quick peek at the vbfields table and it doesn't have a product column. The SELECT columns are all there.
Let me know if you have a suggestion or solution -- thanks!
Jerry
Fri 18th Apr '08, 6:06pm
Sounds like you're using a very old version of ImpEx, or have an existing vbfields table from a previous import.
If you have done an import before, ensure that it is finalized first and the session is deleted.
Re-running ImpEx drops and rebuilds that table.
memcinto
Fri 18th Apr '08, 6:09pm
OK yeah I've been detecting traces of a previous ImpEx import, tried to clear the slate with Database Cleanup and Restart; I used the "Delete Session and all imported data" option -- guess I will try "Remove importids," right?
memcinto
Fri 18th Apr '08, 6:34pm
Ok, running "Remove importids" didn't get rid of the error message. Is there another procedure for removing old sessions?
To back up: I downloaded the latest version of ImpEx today, and only then noticed that there was already an ImpEx folder in our filing system. Starting from the very top, clicking the "Import" link in the admin control panel immediately generated an error, so I deleted the old ImpEx folder and uploaded just the new fresh files. But obviously this didn't get rid of the traces of the previous imports which were before my time so I don't have info on them.
This is all taking place on our testing system. I can probably roll back the new install by just synchronizing the database from our production system to our testing system, and then putting back the old ImpEx folder. The only problem with this is that the Import option didn't show up in the control panel until I uploaded the new Impex folder, so even if I put everything back, I wouldn't be able to get rid of the old sessions.
Advice?
Jerry
Fri 18th Apr '08, 7:45pm
Removing the import id's is one part of it, you have to also delete the session as well as all the old ImpEx files and upload and configure the latests version.
Do not attempt to force an import with and old version or a mix of the two.
memcinto
Mon 21st Apr '08, 12:10pm
OK, how do I delete the session?
memcinto
Mon 21st Apr '08, 1:17pm
OK, figured out how to delete the session.
I'm still getting a similar error (detailed below).
Here is the sequence of events today.
1. Ran "Delete Session" and "Delete Session and all imported dataImpEx" and "Remove importids."
2. Deleted the ImpEx folder and the cpnav_impex.xml file.
3. Started with a fresh install of ImpEx. Edited the config file, uploaded all the files plus one system: txt_file.
4. Went to the Import page in the control panel. Selected txt file input, current forum as target.
5. Clicked to start the first of two modules. Got the following error:
Database errormysql error: Invalid SQL:
SELECT fieldname, vbmandatory, defaultvalue, dictionary
FROM vb3_vbfields
WHERE tablename = 'usergroup'
AND product='vbulletin'
ORDER BY vbmandatory
mysql error: Unknown column 'product' in 'where clause'
mysql error number: 1054
Date: Monday 21st 2008f April 2008 09:10:53 AM
Database: vbforum_test
MySQL error: Unknown column 'product' in 'where clause'
Please help. Thanks.
Jerry
Mon 21st Apr '08, 2:51pm
You must be running with an old install of the vbfields table, the product field has been in the SQL for a long time now.
Drop the vbfields table, delete the session and re-run it.
memcinto
Mon 21st Apr '08, 3:14pm
I dropped the vbfields table (which in our case is called vb3_vbfields) and deleted the session. Now I get this error:
mysql error: Table 'vbforum_test.vb3_vbfields' doesn't exist.
Jerry
Mon 21st Apr '08, 3:32pm
With no session ImpEx always tries to rebuild that table, there must be something wrong with the install or the permissions that ImpEx has on the database.
I've just checked the history of vbfields and the product field was added Aug 21 2006.
All I can suggest is to open a support ticket as it sounds like the install has gone wrong, or more likely that there is an old import session.
Powered by vBulletin™ Version 4.0.0 Beta 4 Copyright © 2009 vBulletin Solutions, Inc. All rights