The SQL doesn't work properly when tables in the database have a prefix (e.g. 'drupal_'). Adding a person generates an error message saying that the moviedb_actors doesn't exist. This can be solved as follows. In the mdb_common.inc file, replace the following code (line 98):
db_query("INSERT INTO {$table} (mid, pid, weight) VALUES (%d, %d, %d)", $mid, $person_id, $weight);
by:
db_query("INSERT INTO {" . $table . "} (mid, pid, weight) VALUES (%d, %d, %d)", $mid, $person_id, $weight);
PHP interprets {$table} as $table.
Apply the change to other SQL queries in the file. The problem seems to be limited to the table names generated via a call to the moviedb_person_to_role function.
Comments
Comment #1
op commentedIt looks like that line 98 is the only offending one. Another fix, mosre consistent with the way the rest of the code is written, is as follows:
db_query("INSERT INTO {%s} (mid, pid, weight) VALUES (%d, %d, %d)", $table, $mid, $person_id, $weight);Comment #2
ultimatedruid commented