PDA

View Full Version : Can't add a user


Sadie Frost
03-12-2002, 11:49 AM
Kind of a weird problem and I'm stumped on it.

I'm running v 2.2.4 at britpack.com

Users can register just fine, but when I try to Add a user via the admin cp, I get this error:

Database error in vBulletin Control Panel 2.2.4:

Invalid SQL: INSERT INTO user (userid,usergroupid,username,password,email,stylei d,parentemail,coppauser,homepage,icq,aim,yahoo,sig nature,adminemail,receivebulletin,receivebulletin_ type,showemail,invisible,usertitle,customtitle,joi ndate,cookieuser,daysprune,lastvisit,lastactivity, lastpost,posts,timezoneoffset,emailnotification,re ceivepm,emailonpm,ipaddress,pmpopup,options,birthd ay) VALUES (NULL,'2','Jonny Lee Miller','17f1df9f24dcdbbad02ae0f620e4ca53','jonny@ britpack.com','2','','0','http://www.','','','','','1','1','1','0','','0',101593846 4,'1','-1',1015938464,1015938464,1015938464,'0','0','1','1 ','0','','0','15','')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Tuesday 12th of March 2002 06:07:44 AM
Script: http://www.britpack.com/admin/user.php
Referer: http://www.britpack.com/admin/user.php?action=add

Can anyone shed a little light on this for me? Thanks!

Admin
03-12-2002, 11:57 AM
Did you install any hacks?

Sadie Frost
03-12-2002, 01:47 PM
Yes, sorry - here is a list of the ones installed. Some of the names might not be exactly as they appear on here though - sorry about that.

1. Welcome Panel
2. Avatar categories
3. threads/posts since your last visit
4. Signature Editor w/ preview
5. clickable avatar on main page (links to edit avatar)
6. Top Referrer
7. Top Poster
8. Top Thread Starter
9. Quick Reply Box
10. Static Post Count
11. Link to edit member's sig in post
12. Community Bulletin Generator
13. Happy Birthday emails
14. Edit Reason
15. Away Reason
16. VBstats
17. quote box
18. number of users online today
19. pm popup
20. popup for guests (logout to see this one once boards are open)
21. stealth moderators on who's online
22. return to forum after post
23. bump without post
24. what style are we using
25. Today's events on main page
26. pm thread starter on thread move
27. total thread views
28. total posts today
29. remove location if none is given
30. gender image hack

The only thing I could think of is that for some reason it's not assigning a userid number when I'm adding members manually. :)

Admin
03-12-2002, 01:48 PM
Can you run a DESCRIBE user; query from phpMyAdmin, and tell me what you get?

Sadie Frost
03-12-2002, 01:55 PM
Not sure how you wanted me to give this to you - hope it's okay :)

Admin
03-12-2002, 01:59 PM
Damn you got lots of field there... one more thing, look at user.php for this:
$options+=iif($showvbcode==1,SHOWVBCODE,0);
right after that, you should have a HUUUUUGE line that starts with $DB_site, paste that line here.

(sorry for asking so many questions :))

Sadie Frost
03-12-2002, 02:13 PM
No problem - I really appreciate your help with this!

$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,stylei d,parentemail,coppauser,homepa ge,icq,aim,yahoo,signature,adminemail,receivebulle tin,receivebulletin_type,showe mail,invisible,usertitle,customtitle,joindate,cook ieuser,daysprune,lastvisit,las tactivity,lastpost,posts,timezoneoffset,emailnotif ication,receivepm,emailonpm,ip address,pmpopup,options,birthday) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashe s(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid', '".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(html specialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslash es(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".adds lashes($signature)."','$adminemail','$receivebulletin','$showemail','$ invisible' ,'".addslashes($usertitle)."','$customtitle',$joindate,'$cookieuser','$dayspru ne ',$lastvisit,$lastactivity,$lastpost,'$posts','$ti mezoneoffset','$emailnotificat ion','$receivepm','$emailonpm','".addslashes($aipaddress)."','$pmpopup','$option s','$birthday')");

Admin
03-12-2002, 02:20 PM
Ok, in that line, add
,'$receivebulletin_type'
right after:
'$receivebulletin'
(note the commas!)

Sadie Frost
03-12-2002, 03:00 PM
That fixed it! Thank you so much Firefly - you're the best! :)

Admin
03-12-2002, 03:02 PM
No probs Sadie. :)