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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.