Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
MySQL Database Error Details »»
MySQL Database Error
Version: , by BigJohnson BigJohnson is offline
Developer Last Online: Jun 2004 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 06-19-2002 Last Update: Never Installs: 0
 
No support by the author.

Database error in vBulletin Control Panel 2.2.5:

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,storep,timezoneoffset,emailnotifica tion,receivepm,emailonpm,ipaddress,pmpopup,options ,birthday) VALUES (NULL,'9','Guest','adb831a7fdd83dd1e2a309ce7591dff 8','.com','1','None@none.com','0','http://.com','None','None','None','I am a Guest','0','0','0','0','Geust','1',1024525836,'0', '-1',1024525836,1024525836,1024525836,'0','0','0','0 ','0','0','','0','0','1986/10/13')
mysql error: Column count doesn't match value count at row 1

mysql error number: 1136

Date: Wednesday 19th of June 2002 06:30:36 PM
Script: /messageboard/admin/user.php
Referer: /messageboard/admin/user.php?action=add


I tried making a new user in the Admin section and this is what i got when i filled the info and i click send. What is wrong?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 06-20-2002, 01:19 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I need this feature back fast because I always create peoples accounts through the admin cp and after a couple of hacks i think this happened. I dont no which hacks it could be because install like 50 so i cannot go back tracking through to see what is wrong. If you need my user.php file i will send it to you please help. Thanks so much. I need it badly. Thanks so much again.
Reply With Quote
  #3  
Old 06-20-2002, 01:24 AM
Steve Machol's Avatar
Steve Machol Steve Machol is offline
 
Join Date: Nov 2001
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You will be violating the licence agreement if you distribute user.php or any vB file. My suggestion is to reupload the original user.php file and see if that fixes the problem. If it does, then at least you'll know where the problem is.

It's also possible that your host upgrade PHP to 4.2.0/4.2.1 which also causes a problem similar to this. If that's the case, the only fix is to either upgrade to 2.2.6 or apply the tached files in freddie's post here:

http://www.vbulletin.com/forum/showt...threadid=44820
Reply With Quote
  #4  
Old 06-20-2002, 02:08 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This did not work. I cant upload the original USER.php file because i have installed so many hacks and i no that file has been edited. There has to be something else i can do to fix this. The mySQL error up top doesn't explain anything to you guys like what happened or what went wrong? and my php version is 4.1.0 and was never upgraded. Someone Please help me out.
Reply With Quote
  #5  
Old 06-20-2002, 02:56 AM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cant just add the new file because i need the upgrades i did for it. I will post pictures of the scripts instead in my PHP programer if that would work instead of actually posting the txt of the code if that is illegal. I really need all the stuff installed. I will do anything. I will take pictures of my database so you can see. What ever you need. PLease help me out.
Reply With Quote
  #6  
Old 06-20-2002, 05:46 AM
FWC's Avatar
FWC FWC is offline
 
Join Date: Oct 2001
Location: Ontario, CA
Posts: 821
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You are missing a value in the second line between 'I am a Guest' and 'Geust'. You have five values in the first line between signature and title and only 4 values in the line below.
Reply With Quote
  #7  
Old 06-20-2002, 01:26 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see now. That makes. Sense. I am going to post some pics to see if this helps because i still don't know how to fix the problem. I would really like to send someone the user.php file for someone to look at. Is it breaking the rules even if the other person has a license and I do and you all know we have a license? Can i take pictures of the php script and post them here? Is that still considered against the license because I really need this fixed bad. This is the main part of the admin section to edit peoples stuff. Please help. I am going to post pics of my admin section where you add a user here are the pics. I don't know if this helps at all but i am trying to tell you all the info you want

http://www.heavenz-cypher.com/bgadmin1.gif

http://www.heavenz-cypher.com/bgadmin2.gif

http://www.heavenz-cypher.com/bgadmin3.gif
Reply With Quote
  #8  
Old 06-20-2002, 01:50 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Now here are some pictures of my database. If you need specific lines from the user.php file just ask. Thanks so much. You guys are all great for helping out.

http://www.heavenz-cypher.com/bgdatabase1.GIF
http://www.heavenz-cypher.com/bgdatabase2.GIF
http://www.heavenz-cypher.com/bgdatabase3.GIF
http://www.heavenz-cypher.com/bgdatabase4.GIF
Reply With Quote
  #9  
Old 06-20-2002, 06:26 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HEre is some code i think that might help. This is a part of the code in the user.php

Please help me out.

PHP Code:
// ###################### Start add #######################
if ($action=="add") {

  echo 
"Add New User";

  
doformheader("user","insert");
  
maketableheader("User Profile");
          
makechoosercode("User Group","usergroupid","usergroup",2);
          
makeinputcode("User Name","ausername");
          
makeinputcode("Password","apassword");
          
makeinputcode("Email Address","email");
          
makeinputcode("User Title","usertitle");
          
makeyesnocode("Use Custom Title<br><font size='1'>(This forces the title that you put in the field above to be used)</font>","customtitle",0);
          
makestylecode("Style set","userstyleid",$user[styleid]);
          
makeinputcode("Home Page","homepage","http://www.");
          
makeinputcode("Birthday<br>(Format yyyy-mm-dd)","birthday");
// Country Hack CP Addon by Stasik (modded by AJ)
          
echo "<tr class='".getrowbg()."'><td>Country Flag</td><td nowrap>";
          eval(
"\$countrytext.= \"".gettemplate("modifyprofile_country")."\";");
          echo 
"$countrytext</td></tr>";
// Country Hack CP Addon End
          
maketextareacode("Signature","signature","",8,45);
          
makeinputcode("ICQ Number","icq");
          
makeinputcode("AIM Handle","aim");
          
makeinputcode("Yahoo Messenger Handle","yahoo");
          
makeyesnocode("COPPA user","coppauser",0);
          
makeinputcode("Parent Email Address","parentemail");
  
maketableheader("Options");
          
makeyesnocode("Receive mailings from admins","adminemail",1);
          
makeyesnocode("Receive Community Bulletin Email","receivebulletin",1);
          
makeyesnocode("Receive Community Bulletin Email Type (Yes = HTML, No = Text)","receivebulletin_type",1);
          
makeyesnocode("Show email address","showemail",1);
          
makeyesnocode("Invisible on 'Online users' list","invisible",0);
          
makeyesnocode("Receive PMs","receivepm",1);
          
makeyesnocode("Email on PM","emailonpm",0);
          
makeyesnocode("PM Popup","pmpopup",0);
          
makeyesnocode("Show Signatures","showsignatures",1);
          
makeyesnocode("Show Avatars","showavatars",1);
          
makeyesnocode("Show Images","showimages",1);
          
makeyesnocode("Show VBcode","showvbcode",1);
          
makeyesnocode("Use email notification by default","emailnotification",1);
          
makeyesnocode("Remember Username and password","cookieuser",1);
          
makeyesnocode("Browse boards with cookies","nosessionhash",1);
          
makeinputcode("Join Date<br>(Format yyyy-mm-dd, leave blank for today)","joindate");
          
makeinputcode("Default view age<br>'Select threads from last x days'<br>Recommended values: 1, 2, 5, 10, 20, 30, 45, 60, 75, 100, 365, 1000 (ie all). -1 gives default forum selection","daysprune","-1");
          
makeinputcode("Last Visit<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastvisit");
          
makeinputcode("Last Activity<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastactivity");
          
makeinputcode("Last Post<br>(Format yyyy-mm-dd hh:mm:ss, leave blank for today)","lastpost");
          
makeinputcode("Number of Posts","posts","0");
          
makeinputcode("Number of Points","storep","0");
          
makeinputcode("Time Zone Offset (hours)","timezoneoffset","0");
          
makeinputcode("IP Address","aipaddress",$ipaddress);
  
maketableheader("Custom Profile Fields");
  
$profilefields=$DB_site->query("SELECT profilefieldid,title FROM profilefield");
  while (
$profilefield=$DB_site->fetch_array($profilefields)) {
    
makeinputcode($profilefield[title],"field".$profilefield[profilefieldid]);
  }

  
doformfooter("Save");
}

// ###################### Start insert #######################
if ($HTTP_POST_VARS['action']=="insert") {

        if (!isset(
$ausername) or $ausername == '') {
                echo 
"<p>You did not give this user an username</p>";
                exit;
        }

        if (
$exists=$DB_site->query_first("SELECT userid FROM user WHERE username='".addslashes(htmlspecialchars($ausername))."'")) {
                echo 
"There is already an ".makelinkcode('user',"user.php?do=edit&userid=$exists[userid]",1)." named <b>".htmlspecialchars($ausername)."</b>";
                exit;
        }

        if (!isset(
$apassword) or $apassword == '') {
                echo 
"You did not give this user a password";
                exit;
        }

  if (
$joindate=="") {
    
$joindate=time();
  } else {
    
$joindate="UNIX_TIMESTAMP('".addslashes($joindate)."')";
  }
  if (
$lastvisit=="") {
    
$lastvisit=time();
  } else {
    
$lastvisit="UNIX_TIMESTAMP('".addslashes($lastvisit)."')";
  }
  if (
$lastactivity=="") {
    
$lastactivity=time();
  } else {
    
$lastactivity="UNIX_TIMESTAMP('".addslashes($lastactivity)."')";
  }
  if (
$lastpost=="") {
    
$lastpost=time();
  } else {
    
$lastpost="UNIX_TIMESTAMP('".addslashes($lastpost)."')";
  }
  if (
$biography=="Location:\r\nOccupation:\r\nInterests:\r\n") {
    
$biography="";
  }

/* remove because it did not like 0000 as year-J $temp = explode("-", $birthday);
  if ((!checkdate($temp[1],$temp[2],$temp[0]))||(!ereg("^[0-9]{4}\-[0-9]{2}\-[0-9]{2}$",$birthday)))
    $birthday = 0; */

  
$options=iif($showsignatures==1,SHOWSIGNATURES,0);
  
$options+=iif($showavatars==1,SHOWAVATARS,0);
  
$options+=iif($showimages==1,SHOWIMAGES,0);
  
$options+=iif($showvbcode==1,SHOWVBCODE,0);

  
$DB_site->query("INSERT INTO user (userid,usergroupid,username,password,email,styleid,parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,receivebulletin,receivebulletin_type,showemail,invisible,usertitle,customtitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,lastpost,posts,storep,timezoneoffset,emailnotification,receivepm,emailonpm,ipaddress,pmpopup,options,birthday) VALUES (NULL,'$usergroupid','".addslashes(htmlspecialchars($ausername))."','".addslashes(md5($apassword))."','".addslashes(htmlspecialchars($email))."','$userstyleid','".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$receivebulletin','$showemail','$invisible','".addslashes($usertitle)."','$customtitle',$joindate,'$cookieuser','$daysprune',$lastvisit,$lastactivity,$lastpost,'$posts','$storep','$timezoneoffset','$emailnotification','$receivepm','$emailonpm','".addslashes($aipaddress)."','$pmpopup','$options','$birthday')");
  
$userid=$DB_site->insert_id();

  
$userfields="";
  
$userfieldsnames="(userid";
  
$profilefields=$DB_site->query("SELECT maxlength,profilefieldid,title
                                  FROM profilefield
                                  ORDER BY displayorder"
);
  while (
$profilefield=$DB_site->fetch_array($profilefields)) {
    
$varname="field$profilefield[profilefieldid]";
    
$userfieldsnames.=",field$profilefield[profilefieldid]";
    
$userfields.=",'".addslashes(htmlspecialchars($$varname))."'";
  }
  
$userfieldsnames.=')';

  
$DB_site->query("INSERT INTO userfield $userfieldsnames VALUES ($userid$userfields)");

  
$action="modify";

  echo 
"<p>Record added</p>";


Reply With Quote
  #10  
Old 06-20-2002, 11:50 PM
BigJohnson BigJohnson is offline
 
Join Date: Nov 2001
Posts: 535
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can someone please help me i need this very quick. I don't no how to fix this error.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04646 seconds
  • Memory Usage 2,388KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete