Hoi!
I'm trying to adapt the moviereview module to a gamereview module, but for some reason, it fails when it's going to insert a review into the databse. It gives the following output:
warning: sprintf(): Too few arguments in /blah/includes/database.inc on line 154.
user error: Query was empty
query: in /blah/includes/database.mysql.inc on line 66.
warning: Cannot modify header information - headers already sent by (output started at /blah/includes/common.inc:384) in /blah/includes/common.inc on line 192.
So, apparently the SQL query is empty... this puzzles me, however, since all I've done in the migrating was to change every instance of "movie" to "game", including the sql table, css file and so on. (Everything is displayed correctly, also the preview when submitting a review).
Here is the gamereview insert function and the moviereview equivalent:
<?php
function gamereview_insert($node) {
db_query("INSERT INTO {gamereview} (nid, gametitle, release, cover, genre, language, media, price, rating, review, systemreq) VALUES (%d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s')", $node->nid, $node->gametitle, $node->release, $node->cover, $node->genre, $node->language, $node->media, $node->price, $node->rating, $node->review, $node->systemreq);
$numlinks = count($node->gamelinks);
for ($i = 0; $i < $numlinks; $i++) {