Jump to content


Photo

Another Error... should be something easy... please help


  • Please log in to reply
3 replies to this topic

#1 jwk811

jwk811
  • Members
  • PipPipPip
  • Advanced Member
  • 714 posts

Posted 21 October 2006 - 11:00 PM

An error on an account activation script.. hes the error

Fatal error: Call to undefined function: () in /home/content/j/w/k/jwk811/html/membership/activate.php on line 21

Heres line 21

if ( $mysql_affected_rows ( $sql ) == 0 )

would you happen to know whats wrong with it?

#2 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 21 October 2006 - 11:14 PM

you need to remove the $ from the front of mysql_affected_rows - mysql_affected_rows is a function, not a variable so it doesn't need it.
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#3 jwk811

jwk811
  • Members
  • PipPipPip
  • Advanced Member
  • 714 posts

Posted 21 October 2006 - 11:41 PM

did that and got a different error

Warning: mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource in /home/content/j/w/k/jwk811/html/membership/activate.php on line 21

same line

#4 hitman6003

hitman6003
  • Members
  • PipPipPip
  • Advanced Member
  • 1,807 posts

Posted 22 October 2006 - 12:22 AM

means that your query failed...put "or die(mysql_error())" on the end of your mysql_query line.

$result = mysql_query("SELECT * FROM tablename") or die(mysql_error());





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users