Helpful Information
 
 
Category: vbBux / vbPlaza
[Error] Username Change

I get this error when trying to change my username.

Database error in vBulletin 3.5.3:

Invalid SQL:

INSERT INTO estorenamechanges (changeid, dateline, changeuserid, oldusername, changedbyuserid)
VALUES
(
0,
1141626094,
'1'
'JsnakeJ',
'1'
);

MySQL Error : Column count doesn't match value count at row 1
Error Number : 1136
Date : Sunday, March 5th 2006 @ 11:21:35 PM
Script : http://www.wrestling-dungeon.net/forums/estore.php
Referrer : http://www.wrestling-dungeon.net/forums/estore.php?do=action&itemid=1
IP Address : **********
Username : JsnakeJ
Classname : vb_database

I believe I just need to run a query to change a column count or something, not quite sure though.

I get this error when trying to change my username.



I believe I just need to run a query to change a column count or something, not quite sure though.

A slight bug in the PHP code, its missing a comma.

You can add it yourself at the following spot..

Inside estore/action.changeusername.php

Find:


// log this change into estorenamechanges
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "estorenamechanges (changeid, dateline, changeuserid, oldusername, changedbyuserid)
VALUES
(
0,
" . TIMENOW . ",
'" . $vbulletin->userinfo['userid'] . "'
'" . $vbulletin->db->escape_string($vbulletin->userinfo['username']) . "',
'" . $vbulletin->userinfo['userid'] . "'
)
");


Replace that with:


// log this change into estorenamechanges
$vbulletin->db->query_write("
INSERT INTO " . TABLE_PREFIX . "estorenamechanges (changeid, dateline, changeuserid, oldusername, changedbyuserid)
VALUES
(
0,
" . TIMENOW . ",
'" . $vbulletin->userinfo['userid'] . "',
'" . $vbulletin->db->escape_string($vbulletin->userinfo['username']) . "',
'" . $vbulletin->userinfo['userid'] . "'
)
");



This will be fixed inside the next release as well.

-CMX

Yep that fixed it. Thank you.










privacy (GDPR)