Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7584207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:51:52+00:00 2026-05-30T18:51:52+00:00

Facebook and Twitter membership script error: (does not record data to the database) Login=>FB/TW

  • 0

Facebook and Twitter membership script error:
(does not record data to the database)

Login=>FB/TW DATABASE=>CONNECT OK!=>BACK TO MY WEBSITE=>MY DATABASE=>ERROR

SQL:

CREATE TABLE users
(
id INT PRIMARY KEY AUTO_INCREMENT,
email VARCHAR(70),
oauth_uid VARCHAR(200),
oauth_provider VARCHAR(200),
username VARCHAR(100),
twitter_oauth_token VARCHAR(200),
twitter_oauth_token_secret VARCHAR(200)
);

loginFacebook.php:

<?php
require 'dbconfig.php';
class User {

function checkUser($uid, $oauth_provider, $username,$email,$twitter_otoken,$twitter_otoken_secret) 
{
    $query = mysql_query("SELECT * FROM `users` WHERE oauth_uid = '$uid' and oauth_provider = '$oauth_provider'") or die(mysql_error());
    $result = mysql_fetch_array($query);
    if (!empty($result)) {
        # User is already present
    } else {
        #user not present. Insert a new Record
        $query = mysql_query("INSERT INTO `users` (oauth_provider, oauth_uid, username,email,twitter_oauth_token,twitter_oauth_token_secret) VALUES ('$oauth_provider', $uid, '$username','$email')") or die(mysql_error());
        $query = mysql_query("SELECT * FROM `users` WHERE oauth_uid = '$uid' and oauth_provider = '$oauth_provider'");
        $result = mysql_fetch_array($query);
        return $result;
    }
    return $result;
}
} ?>

Screen: Error

Column count doesn’t match value count at row 1

What’s wrong?

best regards,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T18:51:53+00:00Added an answer on May 30, 2026 at 6:51 pm

    What you have is

    INSERT INTO `users` (oauth_provider, oauth_uid, username, email, twitter_oauth_token, twitter_oauth_token_secret) 
    VALUES ('$oauth_provider', $uid, '$username','$email')")
    

    As you see you are trying to insert 6 values, however in query you are providing data of only 4 items ('$oauth_provider', $uid, '$username','$email'), it is showing error.

    Below are two ways use you can use depending on the requirement you have.

    Option 1

    INSERT INTO `users` (oauth_provider, oauth_uid, username, email, twitter_oauth_token, twitter_oauth_token_secret) 
    VALUES ('$oauth_provider', $uid, '$username','$email',NULL, NULL)")
    

    OR Option 2

    INSERT INTO `users` (oauth_provider, oauth_uid, username, email)
    VALUES ('$oauth_provider', $uid, '$username','$email')")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How to include login with facebook and twitter option in a website.
I want to add twitter oauth just like facebook connect in my site like
I have a website that uses the facebook, twitter, delicious share links. They contain
When allowing login by OAuth (such as OpenID, Facebook, Twitter, etc), we save the
we need to Login Facebook,Twitter,Gmail from our desktop application we have OAuth tokens such
We are currently introducing facebook and twitter login functionality for our users both on
So I have an app account in which it can login using facebook/twitter or
I want to display some text on twitter/facebook when a link is clicked on
I need to create a simple Chat system like facebook chat and a twitter-like
I am just developing an a desktop application for Twitter, Buzz and facebook. Google

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.