Location: PHPKode > projects > top serious project > bco/functions/functions.threads.php
<?php

//
// Returns true if thread exists, false if it doesn't.
//
function bco_thread_exists($id)
{

	if (($id == '') || (!is_numeric($id))) {
		return false;
	}

	$query = "select id from subject_index where id=$id";

	if (!$result = pg_query($query)) {
		bco_error("in function: bco_thread_exists - query failed.");
	}
	unset($query);
	
	if (pg_num_rows($result) == 1) {
		unset($result);
		return true;
	} else {
		unset($result);
		return false;
	}
	
}

?>
Return current item: top serious project