MyBB Community Forums

Full Version: Thank you mod error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Im getting this error when i try to activate the thank you mod

MySQL error: 1064
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT COUNT(*) FROM mybb_thx t WHERE t.adduid=u.uid) , u.th
Query: UPDATE mybb_users u SET u.thx=(SELECT COUNT(*) FROM mybb_thx t WHERE t.adduid=u.uid) , u.thxcount=(SELECT COUNT(*) FROM mybb_thx t WHERE t.uid=u.uid)
You need as "AS" in there. Try this: SELECT COUNT(*) AS namecount FROM...

You get the rest. When you count you have to name what the count it.
p.s. I don't recommend sub queries. They're better off each in their own query imho.
well you have lost me. Im getting this error message when i try to activate the pluggin
Which one are you using ? The one by "Zaher" or "arash_j13" ?
Im using the Arash_j13 v3.0.1b
spikescot2005 Wrote:Im using the Arash_j13 v3.0.1b

I suggest that you try the one of Zaher and see if you get any errors while activating =P
Tried that on and i get this message

MySQL error: 1050
Table 'mybb_thx' already exists
Query: CREATE TABLE mybb_thx ( txid INT UNSIGNED NOT NULL AUTO_INCREMENT , uid int( 10 ) NOT NULL , adduid int( 10 ) NOT NULL , pid int( 10 ) NOT NULL , tid int( 10 ) NOT NULL , time bigint(30) NOT NULL, PRIMARY KEY ( txid ) ) TYPE = MYISAM ;
spikescot2005 Wrote:Tried that on and i get this message

MySQL error: 1050
Table 'mybb_thx' already exists
Query: CREATE TABLE mybb_thx ( txid INT UNSIGNED NOT NULL AUTO_INCREMENT , uid int( 10 ) NOT NULL , adduid int( 10 ) NOT NULL , pid int( 10 ) NOT NULL , tid int( 10 ) NOT NULL , time bigint(30) NOT NULL, PRIMARY KEY ( txid ) ) TYPE = MYISAM ;

That's probably from that other plugin =P Creating the table was the first in the activate section then it bumped against that "sql-error" =P, can you delete that table through cpanel or phpmyadmin and try again.