Jump to content

hash


TheUnknown

Recommended Posts

All i did was add image1, image2 and it seemed to have caused problems

 

After you attempt to seed the torrent user get an error in their client saying the torrent is not on the server

So i guess its not inserting the $hexhash value into the database now.

Does any one see any obvious reasons why this would be happening?

 

 

 

$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, category, save_as, added, last_action, nfo) VALUES (" .
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $hexhash, $torrent, $totallen, count($filelist), $type, $descr, $descr, $inames[0], $inames[1], 0 + $_POST["type"], $dname))) .
", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)");

 

 

 

$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, image1, image2, category, save_as, added, last_action, nfo) VALUES (" .
        implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $hexhash, $torrent, $totallen, count($filelist), $type, $descr, $descr, $inames[0], $inames[1], 0 + $_POST["type"], $dname))) .
        ", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)");

Link to comment
https://forums.phpfreaks.com/topic/89860-hash/
Share on other sites

1.) Looks to me like half of the strings are unquoted. You must place quotes around any values of your fields which are strings.

 

2.) Whenever your having problems with a query, add an or die statement that will echo the mysql error:

 

mysql_query("....") or die(mysql_error());

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/89860-hash/#findComment-460613
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.