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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:22:42+00:00 2026-06-08T08:22:42+00:00

$i_id = $_GET[‘iiSL’]; require_once(‘../include/dbc.php’); $sql = SELECT invite_id FROM invite_requests WHERE invite_id = ‘$i_id’;

  • 0
$i_id = $_GET['iiSL'];   

require_once('../include/dbc.php');    

$sql = "SELECT invite_id FROM invite_requests WHERE invite_id = '$i_id'";
$result = mysql_query($sql);
if(mysql_num_rows($result == 1))
{
echo 'GOOD ID EXISTS';
//ECHO IS JUST TO TEST  
} 
else
{
echo 'BAD ID IS NOT IN DB';
//ECHO IS JUST TO TEST
}

Why is this not working? It’s driving me insane.

ERROR
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

All spelling, grammar, syntax, and case is correct. URL is passing the $i_id variable. It echo’s out correctly.

What am I doing 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-06-08T08:22:43+00:00Added an answer on June 8, 2026 at 8:22 am

    There is a typo in the condition..try this..

    if(mysql_num_rows($result) == 1)
    

    You are passing result of $result == 1 to mysql_num_rows which expects a result resouce of mysql_query()..:)

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

Sidebar

Related Questions

I passed id from 1 page to another- <?php $sql = SELECT * FROM
I have a sql statement like this: select a.id, a.valfrom ... inner join ...
How can I get ID of last inserted row from SQL Server by PyQt4.QtSql
In url query with id I use is_numeric($_GET['id']) for security issues. But in query
I'm using forms and i get names from database to combobox. (Table Person(idPerson,name,age)) this.personTableAdapter.Fill(this.test_pmDataSet.Person);
I am not sure what is wrong with my JSON response from WCF but
I have Template and two snippets. Can I get Id in Template for select
How I need to send the data from the client in order to get
My question is basically this: If I set dynamic data from one class, can
I finally managed to get data from facebook! But I have a problem displaying

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.