[thelist] mysql_affected_rows() question

Dunstan Orchard dunstan at 1976design.com
Wed Sep 25 09:42:01 CDT 2002


Hi there,

Does anyone know why this doesn't work?


// delete keywords associated with that image
$sql2 = ("DELETE FROM imagekeyword WHERE (imageid = '$DelPic')");

if (mysql_affected_rows(sql2))
	{
	print "good";
	$del_imagekeyword_error = "0";
	}


I get told that 'mysql_affected_rows(sql2)'is not a valid MySQL-Link resource.

Removing the '$sql2' solves it, and the script works, but I can't understand
from the documents (http://www.zend.com/manual/function.mysql-affected-
rows.php) why it doesn't work when I insert the query variable.

Just wondering...

Thanks - dunstan

---------------------------
Dorset, England
http://www.1976design.com/
http://www.orchard.it/
http://www.maccaws.org/



More information about the thelist mailing list