Linked Questions
409 questions linked to/from mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc... expects parameter 1 to be resource
44
votes
6
answers
21k
views
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result [duplicate]
I get the error when trying to run this:
<?php
require_once('includes/DbConnector.php');
$connector = new DbConnector();
$result = $connector->query('SELECT title,content FROM staff_vacancies ...
14
votes
4
answers
229k
views
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in [duplicate]
I get following Error:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in......
Here is my Query:
$query = "SELECT ListNumber FROM residential";
$result1 = ...
14
votes
3
answers
117k
views
Fetch only one row in PHP/MySQL [duplicate]
Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
simple question here.
I have a SELECT query
SELECT FROM friendzone WHERE ID = '$editID'"
I am ...
8
votes
6
answers
137k
views
how to prevent this error : Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in ... on line 11 [duplicate]
I'm very confused with this error, it shows when I try to return a result from the DB that doesn't exist ... I tried mysql_num_rows() but it returns the same error but instead of mysql_fetch_assoc ...
9
votes
2
answers
92k
views
mysql_num_rows() expects parameter 1 to be resource, boolean given in [duplicate]
I'm building a search within my site.
I have a problem with the DB. It's giving me this:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\Program Files (x86)\EasyPHP-5....
6
votes
4
answers
43k
views
Warning: mysql_fetch_row() expects parameter 1 to be resource [duplicate]
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 ...
4
votes
1
answer
34k
views
Warning: mysql_result() expects parameter 1 to be resource, boolean given [duplicate]
My PHP functions script was working fine last night, and now when I logged on to work on it some more today, I am getting
"Warning: mysql_result() expects parameter 1 to be resource, boolean ...
2
votes
7
answers
65k
views
ERROR: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\...\....php on line 19 [duplicate]
I keep on receiving an error message using mysql_num_rows(), can you help me figure out what went wrong on my code?
Here's my code:
<?php
//check if the user press submit
if (isset($_POST['...
2
votes
4
answers
45k
views
No connection could be made using mysql_* API [duplicate]
Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I tried to connect mysql database.but am getting the following error.
Warning: mysql_connect(): [...
0
votes
4
answers
88k
views
'Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in...' but my query is correct [duplicate]
Ok, so I know the question about 'why am I getting this warning with mysql_fetch_array...' has been asked several times, my problem is all the accepted answers state that the reasons the server is ...
3
votes
2
answers
6k
views
array_map show mysql_real_escape_string() expects parameter 1 [duplicate]
Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
when i use
array_map('mysql_real_escape_string', $_POST);
it display
Warning: ...
3
votes
3
answers
5k
views
how to check wordpress custom table is empty or not [duplicate]
This question about wordpress cutom table..
I am creating a plugin I want to check a table named wp_school_post table empty or not.
See my code below which throws the following error
Warning: ...
3
votes
2
answers
15k
views
PHP echo SQL Count [duplicate]
Okay, so I am having a problem. I seem to be unable to successfully echo an SQL Count in PHP.
SQL:
SELECT TableA.C, COUNT(*) FROM TableA JOIN TableB ON (TableA.C = TableB.D)
WHERE TableB.E = 1 ...
1
vote
1
answer
36k
views
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in? [duplicate]
I'm trying to make a log in system using PHP but when I purposely attempt to log in with incorrect credentials this error message appears:
Warning: mysql_num_rows() expects parameter 1 to be ...
4
votes
3
answers
6k
views
How to check if mysql_query returned anything or not [duplicate]
Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
So I am trying to check if the following query returns any result or not
$...