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 8403131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:15:44+00:00 2026-06-09T22:15:44+00:00

The function below will be used to input a Facebook access token into a

  • 0

The function below will be used to input a Facebook access token into a database. The user id will already have an associated record so the “acc_tok” field just needs to be updated.

For some reason even though the $_result value holds “1” and the function echoes out “Successful!”, a warning is appearing that says:

“Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given”. Does anyone know why it appears that the query was successful but is only returning a boolean and not something the mysql_fetch_array can work with? Thanks for reading

function setUserAccessToken($_uid, $_accTok){
        $sql = "UPDATE `user_core` SET `acc_tok`=$_accTok WHERE `id` = $_uid";
        $_result = mysql_query($sql) or die($sql."<br/><br/>".mysql_error());
        echo $_result;
        if ($_result) {
        echo ("Successful!");
            $_resultArray = mysql_fetch_array($_result);
            print_r($_resultArray);
        } else {
            echo ("Failed!");
        }
}
  • 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-06-09T22:15:45+00:00Added an answer on June 9, 2026 at 10:15 pm

    You’re doing an UPDATE query, there are no rows to fetch from the result, hence a boolean value from mysql_query() and not a resource.

    From the manual:

    For other type of SQL statements, INSERT, UPDATE, DELETE, DROP, etc,
    mysql_query() returns TRUE on success or FALSE on error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some function (pasted below little piece of function), which I used as
My function below, will take the values from my custom meta fields (after a
If I run the function below before defining it, I will get this error...
Below is my function that will take a timestamp and tell you the time
My function below calls a partial view after a user enters a filter-by string
I have the function below. It gets the values from checked boxes and transfer
I am using the function below to open the user's default web browser. Public
I have written a function below: void trans(double x,double y,double theta,double m,double n) {
Based on the function below, it is used to load data from file .dat.
This is my current function below. Its used to create a folder in a

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.