problemen met vbulletin forum
dit is de fout melding
-------------------------
Database error in vBulletin 3.0.15:
Invalid SQL:
UPDATE vbullreputationlevel
SET level = 'is an unknown quantity at this point'
WHERE level = 'is an unknown quantity at this poINT';
MySQL Error : Unknown column 'level' in 'where clause'
Error Number : 1054
****************************************************
dit is de tabel
--------------------------
CREATE TABLE `vbullreputationlevel` (
`reputationlevelid` int(10) unsigned NOT NULL auto_increment,
`minimumreputation` int(11) NOT NULL default '0',
PRIMARY KEY (`reputationlevelid`),
KEY `reputationlevel` (`minimumreputation`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
iemand eenig idee?
greetz
Hoe ziet de query er zelf uit die je gebruikt om hem te Update ?
dat gebeurt via een upgrade script en sinds dat ik een noob ben snap ik der even niks meer van
zou je dat update stuk hier dan kunnen posten ?
sprintf($upgradecore_phrases['altering_x_table'], 'reputationlevel', 1, 1),
"UPDATE " . TABLE_PREFIX . "reputationlevel
SET level = 'is an unknown quantity at this point'
WHERE level = 'is an unknown quantity at this poINT'"
);
dit is het gene wat ik uit de php file kan halen
hoeveel regels heeft dat bestand totaal ?
37kb en 1098 regels groot
zo ja zou je dan het helle update stuk hier willen posten
en zou je deze willen posten tussen
code blokken...
Edit:
Zou je er aub hellemaal aan het begin bij willen zetten
Gewijzigd op 01/01/1970 01:00:00 door Marco PHPJunky
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<? // #############################################################################
// fix some broken fields
if ($vbulletin->GPC['step'] == 1)
{
// Write bitfields to datastore // this may move somewhere else in the process at a later date since it will need to be generally ran
// with every upgrade to catch new permissions.
require_once(DIR . '/includes/class_bitfield_builder.php');
if (!vB_Bitfield_Builder::save($db))
{ // couldn't build bitfields bail out
echo "<strong>error</strong>\n";
print_r(vB_Bitfield_Builder::fetch_errors());
}
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'session', 1, 1),
'session',
'languageid',
'smallint',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'administrator', 1, 1),
'administrator',
'languageid',
'smallint',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'moderatorlog', 1, 3),
'moderatorlog',
'type',
'smallint',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'moderatorlog', 2, 3),
'moderatorlog',
'threadtitle',
'varchar',
array('length' => 250, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'moderatorlog', 3, 3),
'moderatorlog',
'attachmentid',
'int',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'userban', 1, 1),
'userban',
'reason',
'varchar',
array('length' => 250, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'setting', 1, 1),
'setting',
'datatype',
'enum',
array('attributes' => "('free','number','boolean')", 'null' => false, 'default' => 'free')
);
// Update usergroup and forumpermissions with new Can View Thread Content permission
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['update_forumpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
forumpermissions = forumpermissions | " .
$vbulletin->bf_ugp_forumpermissions['canviewthreads']
. "
WHERE forumpermissions & " . $vbulletin->bf_ugp_forumpermissions['canview']
);
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['update_forumpermissions'],
"UPDATE " . TABLE_PREFIX . "forumpermission SET
forumpermissions = forumpermissions | " .
$vbulletin->bf_ugp_forumpermissions['canviewthreads']
. "
WHERE forumpermissions & " . $vbulletin->bf_ugp_forumpermissions['canview']
);
// Update genericpermissions with new fulltext search options
$upgrade->run_query(
$upgrade_phrases['upgrade_302.php']['update_genericpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
genericpermissions = genericpermissions | " . $vbulletin->bf_ugp_genericpermissions['cansearchft_bool']
);
// Update calendarpermissions
$upgrade->run_query(
$upgrade_phrases['upgrade_307.php']['update_calendarpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
calendarpermissions = calendarpermissions | " . $vbulletin->bf_ugp_calendarpermissions['isnotmoderated']
);
// Update generic permission with new animated userpic permissions
$upgrade->run_query(
$upgrade_phrases['upgrade_302.php']['update_genericpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
genericpermissions = genericpermissions | " . (
$vbulletin->bf_ugp_genericpermissions['cananimateprofilepic'] +
$vbulletin->bf_ugp_genericpermissions['cananimateavatar']
) . "
WHERE usergroupid IN (5,6,7)"
);
// update admin permissions for plugins if you can edit styles
// (since style management would allow you to edit phpinclude_*)
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['update_adminpermissions'],
"UPDATE " . TABLE_PREFIX . "administrator SET
adminpermissions = adminpermissions | " . $vbulletin->bf_ugp_adminpermissions['canadminplugins'] . "
WHERE adminpermissions & " . $vbulletin->bf_ugp_adminpermissions['canadminstyles']
);
// Update calendar, set all calendars to default to displaying upcoming events.
require_once(DIR . '/includes/functions_calendar.php');
$upgrade->run_query(
$upgrade_phrases['upgrade_307.php']['update_calendarpermissions'],
"UPDATE " . TABLE_PREFIX . "calendar SET options = options | $_CALENDAROPTIONS[showupcoming]"
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'phrasetype',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'phrase',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'template',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'setting',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'settinggroup',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'adminhelp',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
"REPLACE INTO " . TABLE_PREFIX . "datastore
(title, data)
VALUES
('products', '" . $db->escape_string(serialize(array('vbulletin' => '1'))) . "')"
);
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'cron', 1, 1),
"ALTER TABLE " . TABLE_PREFIX . "cron CHANGE minute minute VARCHAR(100) DEFAULT '' NOT NULL"
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'attachmenttype', 1, 3),
'attachmenttype',
'thumbnail',
'smallint',
array('null' => false, 'default' => 0)
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'attachmenttype', 2, 3),
'attachmenttype',
'newwindow',
'smallint',
array('null' => false, 'default' => 0)
);
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'attachmenttype', 3, 3),
"UPDATE " . TABLE_PREFIX . "attachmenttype
SET thumbnail = 1,
newwindow = 1
WHERE extension IN ('gif', 'jpeg', 'jpg', 'jpe','png', 'bmp', 'tiff', 'tif')"
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'attachment', 1, 2),
'attachment',
'extension',
'varchar',
array('length' => 20, 'attributes' => FIELD_DEFAULTS)
);
// Populate the new extension field
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'attachment', 2, 2),
"UPDATE " . TABLE_PREFIX . "attachment SET extension = LOWER(SUBSTRING_INDEX(filename, '.', -1))"
);
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'reputationlevel', 1, 1),
"UPDATE " . TABLE_PREFIX . "reputationlevel
SET level = 'is an unknown quantity at this point'
WHERE level = 'is an unknown quantity at this poINT'"
);
$upgrade->execute();
}
?>
// fix some broken fields
if ($vbulletin->GPC['step'] == 1)
{
// Write bitfields to datastore // this may move somewhere else in the process at a later date since it will need to be generally ran
// with every upgrade to catch new permissions.
require_once(DIR . '/includes/class_bitfield_builder.php');
if (!vB_Bitfield_Builder::save($db))
{ // couldn't build bitfields bail out
echo "<strong>error</strong>\n";
print_r(vB_Bitfield_Builder::fetch_errors());
}
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'session', 1, 1),
'session',
'languageid',
'smallint',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'administrator', 1, 1),
'administrator',
'languageid',
'smallint',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'moderatorlog', 1, 3),
'moderatorlog',
'type',
'smallint',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'moderatorlog', 2, 3),
'moderatorlog',
'threadtitle',
'varchar',
array('length' => 250, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'moderatorlog', 3, 3),
'moderatorlog',
'attachmentid',
'int',
FIELD_DEFAULTS
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'userban', 1, 1),
'userban',
'reason',
'varchar',
array('length' => 250, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'setting', 1, 1),
'setting',
'datatype',
'enum',
array('attributes' => "('free','number','boolean')", 'null' => false, 'default' => 'free')
);
// Update usergroup and forumpermissions with new Can View Thread Content permission
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['update_forumpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
forumpermissions = forumpermissions | " .
$vbulletin->bf_ugp_forumpermissions['canviewthreads']
. "
WHERE forumpermissions & " . $vbulletin->bf_ugp_forumpermissions['canview']
);
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['update_forumpermissions'],
"UPDATE " . TABLE_PREFIX . "forumpermission SET
forumpermissions = forumpermissions | " .
$vbulletin->bf_ugp_forumpermissions['canviewthreads']
. "
WHERE forumpermissions & " . $vbulletin->bf_ugp_forumpermissions['canview']
);
// Update genericpermissions with new fulltext search options
$upgrade->run_query(
$upgrade_phrases['upgrade_302.php']['update_genericpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
genericpermissions = genericpermissions | " . $vbulletin->bf_ugp_genericpermissions['cansearchft_bool']
);
// Update calendarpermissions
$upgrade->run_query(
$upgrade_phrases['upgrade_307.php']['update_calendarpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
calendarpermissions = calendarpermissions | " . $vbulletin->bf_ugp_calendarpermissions['isnotmoderated']
);
// Update generic permission with new animated userpic permissions
$upgrade->run_query(
$upgrade_phrases['upgrade_302.php']['update_genericpermissions'],
"UPDATE " . TABLE_PREFIX . "usergroup SET
genericpermissions = genericpermissions | " . (
$vbulletin->bf_ugp_genericpermissions['cananimateprofilepic'] +
$vbulletin->bf_ugp_genericpermissions['cananimateavatar']
) . "
WHERE usergroupid IN (5,6,7)"
);
// update admin permissions for plugins if you can edit styles
// (since style management would allow you to edit phpinclude_*)
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['update_adminpermissions'],
"UPDATE " . TABLE_PREFIX . "administrator SET
adminpermissions = adminpermissions | " . $vbulletin->bf_ugp_adminpermissions['canadminplugins'] . "
WHERE adminpermissions & " . $vbulletin->bf_ugp_adminpermissions['canadminstyles']
);
// Update calendar, set all calendars to default to displaying upcoming events.
require_once(DIR . '/includes/functions_calendar.php');
$upgrade->run_query(
$upgrade_phrases['upgrade_307.php']['update_calendarpermissions'],
"UPDATE " . TABLE_PREFIX . "calendar SET options = options | $_CALENDAROPTIONS[showupcoming]"
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'phrasetype',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'phrase',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'template',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'setting',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'settinggroup',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->add_field(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
'adminhelp',
'product',
'varchar',
array('length' => 25, 'attributes' => FIELD_DEFAULTS)
);
$upgrade->run_query(
$upgrade_phrases['upgrade_350b1.php']['support_multiple_products'],
"REPLACE INTO " . TABLE_PREFIX . "datastore
(title, data)
VALUES
('products', '" . $db->escape_string(serialize(array('vbulletin' => '1'))) . "')"
);
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'cron', 1, 1),
"ALTER TABLE " . TABLE_PREFIX . "cron CHANGE minute minute VARCHAR(100) DEFAULT '' NOT NULL"
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'attachmenttype', 1, 3),
'attachmenttype',
'thumbnail',
'smallint',
array('null' => false, 'default' => 0)
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'attachmenttype', 2, 3),
'attachmenttype',
'newwindow',
'smallint',
array('null' => false, 'default' => 0)
);
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'attachmenttype', 3, 3),
"UPDATE " . TABLE_PREFIX . "attachmenttype
SET thumbnail = 1,
newwindow = 1
WHERE extension IN ('gif', 'jpeg', 'jpg', 'jpe','png', 'bmp', 'tiff', 'tif')"
);
$upgrade->add_field(
sprintf($upgradecore_phrases['altering_x_table'], 'attachment', 1, 2),
'attachment',
'extension',
'varchar',
array('length' => 20, 'attributes' => FIELD_DEFAULTS)
);
// Populate the new extension field
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'attachment', 2, 2),
"UPDATE " . TABLE_PREFIX . "attachment SET extension = LOWER(SUBSTRING_INDEX(filename, '.', -1))"
);
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'reputationlevel', 1, 1),
"UPDATE " . TABLE_PREFIX . "reputationlevel
SET level = 'is an unknown quantity at this point'
WHERE level = 'is an unknown quantity at this poINT'"
);
$upgrade->execute();
}
?>
Gewijzigd op 01/01/1970 01:00:00 door mark Dijkstra
Heb je zelf wat veranderd aan de code waardoor hij niet meer werkt
en zo ja,
wat heb je veranderd....
Gewijzigd op 01/01/1970 01:00:00 door Marco PHPJunky
sorry had het te laat pas in de gaten :P
nee heb der helemaal niks aan veranderd
de fout zelf zit hem zover ik het nu snel zie in deze 2 regels:
Code (php)
1
2
2
SET level = 'is an unknown quantity at this point'
WHERE level = 'is an unknown quantity at this poINT'"
WHERE level = 'is an unknown quantity at this poINT'"
en het stuk achter de = is een string dus letters en geen getallen..
Edit:
ps. heb je dit Script wel eens eerder uitgevoerd ?
Gewijzigd op 01/01/1970 01:00:00 door Marco PHPJunky
nee dit is de eerste keer wou het forum gaan upgraden dacht dat dat wel makelijk zou gaan maar wat kan ik nu het beste doen dan de int's in de db veranderen of zo??
en nee dat lijkt mij geen goed idee om dat te gaan veranderen want dan heb je kans dat dadelijk meerdere query's fouten/gebreke gaan vertonen
Hoe kom je aan het script? Of zoals Marco zou zeggen: scropt? (a)
ik denk dat ik het gewoon der tussne uit sloop want kan nu niet verder :S
oo sorry mijn fout had het nog niet gezien.
Bedankt voor de verbetering zal het gelijk veranderen...
@mark:
als je het eruit wilt halen en het dan nogmaals wilt proberen
het gaan om dit stuk:
Code (php)
1
2
3
4
5
6
2
3
4
5
6
$upgrade->run_query(
sprintf($upgradecore_phrases['altering_x_table'], 'reputationlevel', 1, 1),
"UPDATE " . TABLE_PREFIX . "reputationlevel
SET level = 'is an unknown quantity at this point'
WHERE level = 'is an unknown quantity at this poINT'"
);
sprintf($upgradecore_phrases['altering_x_table'], 'reputationlevel', 1, 1),
"UPDATE " . TABLE_PREFIX . "reputationlevel
SET level = 'is an unknown quantity at this point'
WHERE level = 'is an unknown quantity at this poINT'"
);
als het werkt of niet werkt laat het hier even weten aub..
succes
Gewijzigd op 01/01/1970 01:00:00 door Marco PHPJunky
thanks voor jullie hulp :D
Bedankt daar zijn we hier onderanderen voor!
gelukkig wel ja ;)