<?
mysql_connect('localhost');
mysql_select_db('foo');
$result = mysql_query(
"update users set email = 'babycarl@lerdorf.com'
where id = 'carl'");
if($result) {
echo mysql_affected_rows();
} else {
echo mysql_error();
}
?>