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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:25:50+00:00 2026-05-23T14:25:50+00:00

I started to work on a Mysql query abut it keeps coming up with

  • 0

I started to work on a Mysql query abut it keeps coming up with a error?

can some one look at it and tell me what i am doing wrong?

$query = ("select * from `users` where (`username`='$username' and `password`='$password' or select * from `users` where `$username `='$email' and `password`='$password')");

the error is

 mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8423624/public_html/testchecklogin.php on line 57

which means that it hasn’t found anyone. This means that my Query is wrong?

  • 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-23T14:25:50+00:00Added an answer on May 23, 2026 at 2:25 pm

    The ... OR SELECT... is giving the error. I think you are trying to write that as:

    $query = ("select * from `users` where (`username`='$username' OR `$username `='$email') and `password`='$password'");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We started using Redmine at work. I know it uses MySQL as the database,
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) I
I started a website some time ago using the wrong CHARSET in my DB
I need some help creating a query for my mySQL database. I have recently
I recently started work on a personal coding project using C++ and KDevelop. Although
I've recently started work on the Compact Framework and I was wondering if anyone
I've started work on a project that will be primarily acting as a Sync
I've just started work on an existing .NET application with about 40 active projects.
An application I have recently started work on has to register two dll's, because
I just finished the Django tutorial and started work on my own project, however,

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.