Jump to content

[Php][MySql]mysql_affected_rows


Recommended Posts

Soit un script :

sql = "UPDATE `Servers` SET `Online`='".$Online."', `Clients`='".$Clients."', `Capacity`='".$Capacity.

"', `LastCheck`='".time()."' WHERE `Id`='".$Id."' AND `Key`='".$Key."'";

// on envoie la requête

$req = mysql_query($sql) or die('SQL Error !<br>'.$sql.'<br>'.mysql_error());

if (mysql_affected_rows($req) == 1){

echo "TRUE";

}else{

echo "FALSE";

}

et le problème c'est qu'il me renvoi : <b>Warning</b>: mysql_affected_rows(): supplied argument is not a valid MySQL-Link

J'ai un script qui utilise mysql_num_rows($req), construit de la même façon et qui ne me pause aucun problème.

Que faire?

Merci.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...