Jump to content

mysql_affected_rows problem


Hodo

Recommended Posts

Here is the code

$query = "INSERT INTO Ranscore SET pname = '$name', pscore = '$score', pdate = '$date' WHERE id = '$id' ";

$result = mysql_query($query)  or die ("Error in query: $query. ".mysql_error());

 

$rows = mysql_affected_rows($result);

 

and here is the response:

 

mysql_affected_rows(): supplied argument is not a valid MySQL-Link resource

 

I just wanted to see if $rows was > 0

what am I doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/58858-mysql_affected_rows-problem/
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.