The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Invalid Default Value
Okay, with newer version we are not allowed to use DEFAULT '0' like we were and this is causing problems in some older, but still popular hacks. Shoutbox, and Member Album to name a couple.
If we are will to to make the corrections we need to know what changes to make. In Shoutbox there is this code: Code:
$query['new'][] = 'CREATE TABLE '.TABLE_PREFIX.'shoutbox_posts ( `shoutid` BIGINT (255) UNSIGNED DEFAULT \'0\' AUTO_INCREMENT, `text` TEXT, `userid` BIGINT (255) UNSIGNED DEFAULT \'0\', `username` VARCHAR (255) DEFAULT \'0\', `ip` VARCHAR (25) DEFAULT \'0\', `time` BIGINT (20) UNSIGNED DEFAULT \'0\', `edittime` BIGINT (20) UNSIGNED DEFAULT \'0\', `edituser` VARCHAR (255) DEFAULT \'0\', `deleted` TINYINT(1) UNSIGNED DEFAULT \'0\', PRIMARY KEY(`shoutid`))'; $query['new'][] = 'ALTER TABLE '.TABLE_PREFIX.'usergroup ADD `shoutboxpermissions` INT(10) UNSIGNED DEFAULT \'0\' NOT NULL, ADD `shouthierarchy` TINYINT(5) UNSIGNED DEFAULT \'0\' NOT NULL, ADD `shoutmaxdaily` TINYINT(5) UNSIGNED DEFAULT \'0\' NOT NULL'; $query['new'][] = 'ALTER TABLE '.TABLE_PREFIX.'user ADD `shouts` BIGINT(10) UNSIGNED DEFAULT \'0\' NOT NULL, ADD`shoutbanned` TINYINT(1) UNSIGNED DEFAULT \'0\' NOT NULL'; There doesn't seem to be any support for this, at least not enough to make it worth mentioning. So, can somebody tell me how to modify these queries so they work? Thanks a bunch. |
#2
|
|||
|
|||
New version of what? vB, MySQL?
And what doesn't work, you get an error message? And please post questions about a hack in the thread about that hack. |
#3
|
|||
|
|||
New versions of MySQL.
Yes there is an error, Invalid Default Value '0' This is not about the hack, this is about correcting queries. |
#4
|
|||
|
|||
And what is the exact error you are getting?
|
#5
|
|||
|
|||
Ahh just checked those queries now. There is 1 error in them:
[sql] `shoutid` BIGINT (255) UNSIGNED DEFAULT \'0\' AUTO_INCREMENT, [/sql] You can not have a default value for an auto increment field. Change that line to: [sql] `shoutid` BIGINT (255) UNSIGNED AUTO_INCREMENT, [/sql] |
#6
|
|||
|
|||
Actually if you would have posted this in the Shoutbox thread, i think someone would have been able to help you much faster, since the answer to your question is already there: https://vborg.vbsupport.ru/showthrea...ent#post639730
|
#7
|
|||
|
|||
Beleive it or not, I read the whole damned thing, and missed it.
I guess it was just too much. Thanks. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|