0

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\classes\Trade.class.php on line 12

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\classes\Trade.class.php on line 19

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\classes\Trade.class.php on line 70

Line 12

while ( $trade_users_row = mysql_fetch_array($trade_users_query) )

Line 19

while ($trade_items = mysql_fetch_array($trade_items_query) )

Line 70

$quantity_result = mysql_fetch_assoc( $quantity_query );

I can't figure out what I've done wrong.

Any help would be much appreciated :)

5
Contributors
5
Replies
16
Views
6 Years
Discussion Span
Last Post by guruparthi
0

It might help to know what you have assigned to $trade_users_query, $trade_items_query and $quantity_query.

0

My problem was I forgot to create the table I was trying to query.

Thanks anyway.

0

Your mysql query return no values. So you got this error. To avoid this error, you need to add die(mysql_error()) after your query

ie,

mysql_query("select * from tbl_name") or die(mysql_error());

If the query is not correct, then it give error message. Now you can know whether your query return values or not

Edited by pritaeas: Removed self-promotion link.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.