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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:56:45+00:00 2026-06-04T02:56:45+00:00

i am having trouble with what seems quite a simple select query, i know

  • 0

i am having trouble with what seems quite a simple select query, i know there are lots of tutorials out there for this, but none seem to work for me, i keep getting the

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given

Error

Here is the query causing it, basically i just want to select from 2 different tables

$trash_statement = "SELECT * FROM user_inbox, user_outbox WHERE user_inbox.receiver_user_id='$user_id' AND user_outbox.sender_user_id='$user_id' AND mail_deleted='1'";

Any ideas, where i am going wrong?

Thanks

  • 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-04T02:56:46+00:00Added an answer on June 4, 2026 at 2:56 am

    mail_deleted is not associated with any table name! That causes Mysql to return an error and not a resource as expected by mysql_fetch_assoc().

    MySql Error: saying that the field name is not related to anything

    #1052 - Column 'mail_deleted' in where clause is ambiguous
    

    YOUR QUERY

    $trash_statement = "
      SELECT * 
      FROM user_inbox, user_outbox 
      WHERE user_inbox.receiver_user_id='$user_id' 
      AND user_outbox.sender_user_id='$user_id' 
      AND yourTableName.mail_deleted='1'";
    

    FIX THIS:

    … yourTableName.mail_deleted…

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

Sidebar

Related Questions

Ok this seems so silly but I'm having some trouble getting this to work.
This seems like it should be quite simple, but for some reason I can't
Ok, so, im having trouble with this program im writing, it all seems to
I'm having some trouble figuring out the best way to do this, and I
I'm having trouble getting chrome to display my custom cursor correctly but it seems
I am having trouble with my javascript. It seems to be acting oddly. This
I am having trouble working out how to create a simple pop-and-drop effect for
I realize there are quite a few posts on this subject, but I am
I'm having trouble moving a website from one server to another. It seems to
I'm having trouble getting ember to render a dynamic child view. It seems that

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.