This highlights perfectly the need to lay code out properly. Another tip is to keep language code and functions out of things like SQL queries. This is your code but laid out differently:
Code:
$whoKnows = 0 + $_POST["type"];
$searchText = implode(",",
array_map("sqlesc",
array(searchfield("$shortfname $dname $torrent"),
$fname,
$uploaderid,
"no",
$infohash,
$torrent,
$totallen,
count($filelist),
$type,
$descr,
$descr,
$inames[0],
$inames[1],
$whoKnows,
$dname)));
$queryTime = get_date_time();
$sql = <<<EOT
INSERT INTO books(
search_text,
filename,
owner,
visible,
info_hash,
name,
size,
numfiles,
type,
descr,
ori_descr,
image1,
image2,
category,
save_as,
added,
last_action,
nfo,
comm_enabled,
cover)
VALUES(
$searchText,
$queryTime,
$queryTime,
$nfo,
$comm_enabled,
$cover)
EOT;
$ret = mysql_query ($sql);