Location: PHPKode > projects > MyNotebook > mynotebook/notes.delete.php
<?php
function deleteNote ()
{
	global $db_tableName;
	global $id;
	

	$result = mysql_query ("DELETE FROM $db_tableName WHERE id=$id;");
	if ($result)
	{
	    // Note successfully deleted
	    //$jsonResponse->addvalue ("id", $id);
	}
	else
	{
	    //$jsonResponse->addValue ("errorText", mysql_error());
	}
	//echo $jsonResponse->createJSONString();
	$newNote = new Note ($id, $note, $tags, $dateTime);
	$jsonArray = array();
	$jsonArray[0]["errorText"] = $errorText;
	$jsonArray[1]["id"] = $newNote->getId();
	$json = new Services_JSON();
	echo $json->encode($jsonArray);

	exit;
}

?>
Return current item: MyNotebook