{"id":14097878,"date":"2021-02-24T20:09:25","date_gmt":"2021-02-24T20:09:25","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/database-errors-70\/"},"modified":"2021-02-24T20:09:25","modified_gmt":"2021-02-24T20:09:25","slug":"database-errors-70","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/database-errors-70\/","title":{"rendered":"Database Errors"},"content":{"rendered":"<p>Hi there,<\/p>\n<p>There&#8217;s some errors in your code:<\/p>\n<p>in class-links-list-table.php line 51 there&#8217;s<\/p>\n<pre><code>    $filename = $wpdb-&gt;get_var( \n      &quot;SELECT filename FROM wp_dispatcher_uploads WHERE id = {$item[&#039;upload_id&#039;]}&quot;\n     );\n<\/code><\/pre>\n<p>This should be something like this:<\/p>\n<pre><code>    $filename = $wpdb-&gt;get_var( \n      &quot;SELECT filename FROM {$wpdb-&gt;prefix}dispatcher_uploads WHERE id = {$item[&#039;upload_id&#039;]}&quot;\n     );\n<\/code><\/pre>\n<p>also line 110 of class-wp-dispatcher-downloader.php is this:<\/p>\n<pre><code>      else {\n        $upload = $wpdb-&gt;get_row(&quot;SELECT * FROM wp_dispatcher_uploads WHERE id = {$link-&gt;upload_id}&quot;);\n        $count = $upload-&gt;count + 1;\n        $wpdb-&gt;update( \n          &#039;wp_dispatcher_uploads&#039;, \n          array( &#039;count&#039; =&gt; $count ), \n   <\/code><\/pre>\n<p>Shouldn&#8217;t that be more like:<\/p>\n<pre><code>      else {\n        $upload = $wpdb-&gt;get_row(&quot;SELECT * FROM {$wpdb-&gt;prefix}dispatcher_uploads WHERE id = {$link-&gt;upload_id}&quot;);\n        $count = $upload-&gt;count + 1;\n        $wpdb-&gt;update( \n          $wpdb-&gt;prefix . &#039;dispatcher_uploads&#039;, \n          array( &#039;count&#039; =&gt; $count ), \n   <\/code><\/pre>\n","protected":false},"template":"","class_list":["post-14097878","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14097878","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14097878\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=14097878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}