By outputting mysql_error() to the page you will receive exactly the same error string that the client will give you

Just a little tip to save the time wasting of firing up your client ;-)

----- Original Message ----- From: "Shahmat Dahlan" <[EMAIL PROTECTED]>
Sent: Tuesday, December 13, 2005 11:15 AM
Subject: Re: [PHP-DB] Minor Change

did it say which line does the error

"Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in"

is referring to. if it is referring to the line which contains the function call mysql_query (), dpirago is right, there could be some mistake in the sql statement. running it through the mysql client would definitely verify whether your query is correct or not.



Echo out the query. Check it. Run it from the MySQL client.

What does the error message say? Does the table "109fh6" actually exist in
the database?


#  Ken responded:
# After adding echo mysql_error(); I get the same result. I tried changing

# the query to include 109fh7 (a table which doesn't exist) and got the
# result as with 109fh6.  Changing to 109fh5 does pull up that table.  The

# line to which the error message refers is while ($row = mysql_fetch_assoc

# ($data_set))  That is what always come up when there is an error in the
# query.

On Mon, 12 Dec 2005 14:13:10 -0500, Micah Stevens

You're getting an error, after the query, put:

echo mysql_error();

to find out what's happening.

On Monday 12 December 2005 11:05 am, [EMAIL PROTECTED] wrote:

I made tiny changes to my php file and sql table and the table won't
up.  I updated the table name (and php file name) from 109fh5 to 109fh6.
In the table, I changed 6 cells, leaving a couple blank.  Then I changed
only the digit "5" to make it a "6" (109fh6) in the following:

$get_data_query = "select rep, party, state, cd, minority, afr_am,
am_indian, hispanic, med_hsehold_income, poverty from 109fh6 order by
$sort_field $sort_order";

Now I get "Warning: mysql_fetch_assoc(): supplied argument is not a
MySQL result resource in" etc.

I've done this many times without a problem (this is the 6th time in
sequence).  What could be wrong after such a minor change?


PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to