serik Posted April 8, 2006 Share Posted April 8, 2006 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 More sharing options...
Sentinel Posted April 8, 2006 Share Posted April 8, 2006 Normal, ces deux fonctions ne prennent pas le même type d'argument. http://fr3.php.net/manual/fr/function.mysql-num-rows.php http://fr3.php.net/manual/fr/function.mysq...fected-rows.php Link to comment Share on other sites More sharing options...
serik Posted April 9, 2006 Author Share Posted April 9, 2006 Merci j'avais pas crâmé la différence (et j'avais bien lu le manuel, autant de Php que de Mysql). Je débute en Php... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.