View Full Version : Database Error(plzz Help-Urgent)
Osama11
08-20-2010, 04:47 AM
Now everytime i click on any forum or thread its gives a database error
Database error in vBulletin 4.0.2:
Invalid SQL:
(SELECT 'package' AS classtype, package.packageid AS typeid, package.packageid AS packageid,
package.productid AS productid, if(package.productid = 'vbulletin', 1, product.active) AS enabled,
package.class AS class, -1 as isaggregator
FROM package AS package
LEFT JOIN product AS product
ON product.productid = package.productid
WHERE product.active = 1
OR package.productid = 'vbulletin'
)
UNION
(SELECT 'contenttype' AS classtype, contenttypeid AS typeid, contenttype.packageid AS packageid,
1, 1, contenttype.class AS class , contenttype.isaggregator
FROM contenttype AS contenttype
INNER JOIN package AS package ON package.packageid = contenttype.packageid
LEFT JOIN product AS product ON product.productid = package.productid
WHERE product.active = 1
OR package.productid = 'vbulletin' );
borbole
08-20-2010, 01:29 PM
Now everytime i click on any forum or thread its gives a database error
Database error in vBulletin 4.0.2:
Invalid SQL:
(SELECT 'package' AS classtype, package.packageid AS typeid, package.packageid AS packageid,
package.productid AS productid, if(package.productid = 'vbulletin', 1, product.active) AS enabled,
package.class AS class, -1 as isaggregator
FROM package AS package
LEFT JOIN product AS product
ON product.productid = package.productid
WHERE product.active = 1
OR package.productid = 'vbulletin'
)
UNION
(SELECT 'contenttype' AS classtype, contenttypeid AS typeid, contenttype.packageid AS packageid,
1, 1, contenttype.class AS class , contenttype.isaggregator
FROM contenttype AS contenttype
INNER JOIN package AS package ON package.packageid = contenttype.packageid
LEFT JOIN product AS product ON product.productid = package.productid
WHERE product.active = 1
OR package.productid = 'vbulletin' );
Can you post that part where it says: MySQL error:...........................
Osama11
08-20-2010, 01:34 PM
MySQL Error : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='
borbole
08-20-2010, 01:40 PM
MySQL Error : Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin1_general_ci,IMPLICIT) for operation '='
Have a look at this thread
http://www.vbulletin.com/forum/showthread.php?340619-Illegal-mix-of-collations-%28latin1_danish_ci-IMPLICIT%29-and-%28latin1_swedish_ci-IMPLICIT
Osama11
08-20-2010, 02:32 PM
I have CHanged Every Single table collation to latin1_swedish_ci Still its not working.
Every time i click on any forum or thread it gives an error
plzz help me.
Xtrigit
08-20-2010, 03:33 PM
Try repairing the tables.
phpmyadmin>database>select tables> Repair table.
Lynne
08-20-2010, 04:30 PM
Sometimes you need to go into the tables and change the fields also.
borbole
08-20-2010, 04:34 PM
Lynne is right. In this case a simple repair of the tables won''t work. It is a bit more complicated than that.
Videx
08-21-2010, 01:57 AM
Yes, all those posts telling you to use phpmyadmin to change collation are basically in error. They may work for some, but the app has no capability of changing fields, only tables. But since even a slow vb forum can have hundreds of fields, you really can't change them all manually.
A db backup is a plain text file, so I have successfully done this with a simple Search and Replace operation.
But I don't know. If you suddenly got this error I'd sooner suspect some add-on is the culprit. The collations were working on Monday; they didn't change on their own Tuesday.
Osama11
08-22-2010, 03:43 PM
lynne can u plzz make me some php script which can solve this problem by installing in root and run it???
plzzzzz
Lynne
08-22-2010, 11:34 PM
Sorry, I cannot do that. Someone actually did write a script to do this and posted it over on vbulletin.com, so search over there for threads about collation issues and you should find it.
borbole
08-24-2010, 11:39 AM
I remember writting such a script for another user at vb.com. Anyway, this has been solved at my forum, here
http://www.forumservices.eu/showthread.php?38-Need-help-Upgent.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.