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

  • Home
  • SEARCH
  • 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 6369013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:44:55+00:00 2026-05-25T00:44:55+00:00

Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I

  • 0

Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select

I am receiving the below message when I run this script:

Warning: mysql_fetch_row() expects parameter 1 to be resource, string given in /var/www/html/toolkit/routing.php on line 12

I have ran the query in the mysql console and it prints the correct row. Not sure why I cant get it to show up in php?

routing.php page:

<?php
error_reporting(E_ALL);
////error_reporting(0);
ini_set('display_errors', 'On');
include("db/sbc_config.php");
include("db/mysql.class.php");
$db = new MySQL(true, DB_DATABASE_ROUTING, DB_SERVER, DB_USER , DB_PASS);
if ($db->Error()) $db->Kill();

        $searchroute = "SELECT * FROM destination_route as d WHERE d.destPrefix='2146811'";

        $result = mysql_fetch_row($searchroute);
    echo $result;

    ?>

sbc_config.php:

<?php
//database server
define('DB_SERVER', "10.10.1.146");

//database login name"
define('DB_USER', "user");

//database login password
define('DB_PASS', "pasword");

//database names
define('DB_DATABASE_ROUTING', "routing");

//smart to define your table names also
define('TABLE_DESTINATION_ROUTE', "destination_route");


?>
  • 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-25T00:44:56+00:00Added an answer on May 25, 2026 at 12:44 am

    mysql_fetch_row takes a cursor and returns the next row in that cursor. You’re trying to give it a string. You’re missing a step.

    You’ll have to execute that query first:

    $cursor = mysql_query($searchroute); // for example
    $result = mysql_fetch_row($cursor); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select This
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select when
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select When
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select Here's
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select i
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I
Possible Duplicate: mysql_fetch_array() expects parameter 1 to be resource, boolean given in select I
Possible Duplicate: “Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given” error while

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.