phpBBHacks.com - SQL Error
Talk martial arts at KarateForums.com
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Support
 See a User Guidelines violation? Please contact us.
Author Message

Seth Sandrino
New User

Joined: 12 Jan 2010
Posts: 22

PostPosted: February 17th 2010, 9:35 pm    Post subject: SQL Error Reply with quote

I'm having some trouble with some SQL that I can't figure out.


I'm getting this error:

Code:
Couldn't insert ban_email info into database

DEBUG MODE

SQL Error : 1136 Column count doesn't match value count at row 1

INSERT INTO phpbb_banlist (ban_email, ban_reason, ban_until) VALUES ('test@yahoo.com', 'To test, 0')


Line : 310
File : admin_user_ban.php
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email, ban_reason, ban_until)
            VALUES ('" . str_replace("\'", "''", $email_list[$i]). "', '" . str_replace("\'", "''", $ban_reason) . ", " . $email_ban_until . "')";


From this code:

Code:
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email, ban_reason, ban_until)
            VALUES ('" . str_replace("\'", "''", $email_list[$i]). "', '" . str_replace("\'", "''", $ban_reason) . ", " . $email_ban_until . "')";


(Although it shows it in the error so no suprise there)

As far as I know since I told it which 3 to enter the values in and it seems to have 3 values I cant figure out where the issue is....although I'm sure you all will.

Thanks once again,
Back to top
View user's profile Send private message

Wicher
Experienced User

Joined: 23 Apr 2003
Posts: 443
Location: Netherlands or Holland, your choice..

PostPosted: February 18th 2010, 12:48 pm    Post subject: Reply with quote

Replace the code in your second codeblock with following:
Code:
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email, ban_reason, ban_until)
            VALUES ('" . str_replace("\'", "''", $email_list[$i]). "', '" . str_replace("\'", "''", $ban_reason) . "', " . $email_ban_until . ")";


It looks the same but its not.
_________________
My little mods | Statistics Mod 4.x.x (revision of 2.1.5) | My hacks at phpbbhacks
Back to top
View user's profile Send private message Send e-mail Visit poster's website

Seth Sandrino
New User

Joined: 12 Jan 2010
Posts: 22

PostPosted: February 23rd 2010, 8:04 pm    Post subject: Reply with quote

Thanks again Wicher.
Back to top
View user's profile Send private message

Wicher
Experienced User

Joined: 23 Apr 2003
Posts: 443
Location: Netherlands or Holland, your choice..

PostPosted: February 24th 2010, 11:46 am    Post subject: Reply with quote

Your welcome
_________________
My little mods | Statistics Mod 4.x.x (revision of 2.1.5) | My hacks at phpbbhacks
Back to top
View user's profile Send private message Send e-mail Visit poster's website

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: February 24th 2010, 2:54 pm    Post subject: Reply with quote

Go Wicher!

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Support All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.