Jump to content

Recommended Posts

I've moved my code to a new server, and ive now got these errors

 

Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 42

 

Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 42

 

Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 57

 

Warning mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/niccaman/public_html/checkuser.php on line 57

 

Warning cannot modify header information - headers already sent by (output started at /home/niccaman/public_html/checkuser.php:42) in home/niccaman/public_html/checkuser.php on line 24

 

 

Whats up with this?

 

Here are the lines around 42:

 

37  global $con;

38  $q = "SELECT ID FROM userinfo WHERE username = '$user'";

39  $result = mysql_query($q, $con);

40  $result = mysql_fetch_array($result) o die ('error: ' .mysql_error());

41  $i = 0;

42  while ($i <= mysql_num_rows($result))

43  {

44    $r = $r . $result[$i];

45  $i++;

46  }

47

48  return $r;

49  }

 

 

help would be great :)

 

Link to comment
https://forums.phpfreaks.com/topic/146937-solved-mysql_num_rows-error/
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.