How can I set a message if db_delete deleted one or more rows
Sure, db_delete() returns an object so you can continue working with the object, but the last method called (the method whose return value your conditional is really checking) in your statement is Query::execute, which returns boolean TRUE or FALSE indicating whether the query worked. So, ultimately the whole statement:

db_delete('drealty_fields')
  -&gt;condition('conid', $conid)
  -&gt;execute();


Should return TRUE or FALSE since you're ultimately executing the Query::execute method. The workflow is just that you call db_delete(), which returns an object, Query::condition, returns an object, then Query::execute returns boolean, but your conditional is just getting and checking the return value of the last method called - execute - rather than the return value of db_delete(). Essentially, the db_delete() return value was already operated on by continuing with a condition, and the condition's return value is inconsequential because it was operated on by execute, thus the execute's return value is the only one really getting sent back to the if statement. Make sense?

So, in essence each of these examples should give the same results:

$query = db_delete('drealty_fields');
$query-&gt;condition('conid', $conid);
$success = $query-&gt;execute();
if ($success) {
  // Do something.
}

$query = db_delete('drealty_fields');
$query-&gt;condition('conid', $conid);
if ($query-&gt;execute()) {
  // Do something.
}

if (db_delete('drealty_field's)-&gt;condition('conid', $conid)-&gt;execute()) {
  // Do something.
}