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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:35:35+00:00 2026-06-13T11:35:35+00:00

It seems there’s something wrong with this. I don’t get any distinct errors, but

  • 0

It seems there’s something wrong with this. I don’t get any distinct errors, but it’s simply not doing what its supposed to be doing. I’m leaning towards there being a problem with the OR statements, but I’ve put the username in parenth, and the id slots in parenth, and neither work. Honestly, i’m only posting this here because five hours of looking at it got to be enough for me.
Hopefully something looks blatantly wrong and it’s not somewhere else in the code :/

$fetch_userone_idslots = mysql_query("SELECT id_1, id_2, id_3, id_4, id_5, id_6 FROM users WHERE id_1 = '$battle_id' || id_2 = '$battle_id || id_3 = '$battle_id || id_4 = '$battle_id || id_5 = '$battle_id || id_6 = '$battle_id && username == '$user_logged_in'");

while ($row = mysql_fetch_array($fetch_userone_idslots)){
$useroneidslot_1 = $row['id_1'];
$useroneidslot_2 = $row['id_2'];
$useroneidslot_3 = $row['id_3'];
$useroneidslot_4 = $row['id_4'];
$useroneidslot_5 = $row['id_5'];
$useroneidslot_6 = $row['id_6'];
}
  • 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-13T11:35:36+00:00Added an answer on June 13, 2026 at 11:35 am

    You are using a == which does not exist in MySQL. Use just =. You can simplify your query like this

    SELECT id_1, id_2, id_3, id_4, id_5, id_6 FROM users
    WHERE '$battle_id' in (id_1, id_2, id_3, id_4, id_5, id_6) 
    and username = '$user_logged_in'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't quite believe this, but seems there's no way to get tweets from
I'm trying to get this nodetime running, but seems there's some prblems I can't
Is there any drop shadow plugin for jquery? Seems there was but is no
I've searched on here but it seems there was no question like this before.
ok so i've nearly got this. But it seems there is some logic error
It seems there are many ways to do this, however, none of them make
I am trying to read command lien argument but it seems there is some
I'm trying to create a branch from a remote tag, but it seems there's
There are plenty of Libraries to parse XML, but it seems there aren't many
http://www.php.net/archive/2010.php#id2010-07-22-2 I want to test it on Windows but it seems there isn't 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.