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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:46:18+00:00 2026-05-31T12:46:18+00:00

Possible Duplicate: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in php

  • 0

Possible Duplicate:
mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in php
mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource

Im working with two MYSQL databases trying to gahter data from both of them to insert in to field for submission to another database. When i go and use the mysql_fetch_assoc() for the query it gives me an error. I did some research and I cannot find anything that really pertaied to my issue. I was wondering if i could get some help.

<?php
$connect = mysql_connect("localhost","***********","*********") or die ("Couldn't Connect"); //host,username,password
mysql_select_db("virtua15_jo151") or die ("Could not find database");


$query = mysql_query("SELECT jos_comprofiler.firstname, jos_comprofiler.lastname, jos_users.username, jos_comprofiler.cb_country, jos_users.email FROM jos_users LEFT JOIN jos_comprofiler ON jos_users.id=jos_comprofiler.id WHERE jos_users.id = " . mysql_real_escape_string($id));


if ($row = mysql_fetch_assoc($query))
{
    $firstname = $row['firstname']; //This is whatever the field is called in your table
    $lastname = $row['lastname'];
    $loginname = $row['jos_users.username'];
    $country = $row['cb_country'];
    $email = $row['email'];

}

?>

below this is all HTML I can include that if need be,

  • 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-31T12:46:20+00:00Added an answer on May 31, 2026 at 12:46 pm

    Something is wrong with query check with print mysql_error();

    Check query. quote properly values assigned in query.

    $query = mysql_query("SELECT jos_comprofiler.firstname, jos_comprofiler.lastname,
             jos_users.username, jos_comprofiler.cb_country, jos_users.email 
             FROM jos_users LEFT JOIN jos_comprofiler ON jos_users.id=jos_comprofiler.id 
             WHERE jos_users.id ='".mysql_real_escape_string($id)."'");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result Warning: mysql_fetch_assoc():
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result In db.php
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result what is
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result okay so
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result I have
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result This is
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result I tried
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result I've this
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result $err =
Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result I'm having

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.