Jump to content

Invalid arguements


FarhanKhalaf

Recommended Posts

Surprisingly I'm getting an error that I wasn't getting before, and I'm not sure what changed...

 

I am getting :

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/retai13/public_html/secret/Nordstrom.php on line 90

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/retai13/public_html/secret/Nordstrom.php on line 92

 

referring to $shoppercount

 

<?php $shopperid = mysql_query("SELECT UserID FROM users WHERE Username = '$username'");
				 $getshopperid = mysql_fetch_array($shopperid);
				 $getshopperid = $getshopperid['UserID'];
				$shoppercount = mysql_query("SELECT * FROM nordstromlisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM saksfifthavenuelisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM gnclisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM guesslisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM urbanoutfitterslisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM americaneaglelisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM footlockerlisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM bananarepubliclisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM neimanmarcuslisting WHERE ShopperID = '$getshopperid'");
				$test123 = mysql_num_rows($shoppercount);

				 if (mysql_num_rows($shoppercount) > 2) {
					echo "You are currently at the maximum (3) amount of listings you can create in a five day span.";
				}
				else {

Link to comment
https://forums.phpfreaks.com/topic/158702-invalid-arguements/
Share on other sites

Try...

 

<?php $shopperid = mysql_query("SELECT UserID FROM users WHERE Username = '$username'");
				 $getshopperid = mysql_fetch_array($shopperid);
				 $getshopperid = $getshopperid['UserID'];
				$shoppercount = mysql_query("SELECT * FROM nordstromlisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM saksfifthavenuelisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM gnclisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM guesslisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM urbanoutfitterslisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM americaneaglelisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM footlockerlisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM bananarepubliclisting WHERE ShopperID = '$getshopperid'
				UNION ALL SELECT * FROM neimanmarcuslisting WHERE ShopperID = '$getshopperid'") or die(mysql_error());
				$test123 = mysql_num_rows($shoppercount);

				 if (mysql_num_rows($shoppercount) > 2) {
					echo "You are currently at the maximum (3) amount of listings you can create in a five day span.";
				}
				else {

 

...and post back here what error is printed.

Link to comment
https://forums.phpfreaks.com/topic/158702-invalid-arguements/#findComment-836971
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.