Title: error in database_code.php
Last modified: August 31, 2016

---

# error in database_code.php

 *  [MadUpgrade](https://wordpress.org/support/users/madupgrade/)
 * (@madupgrade)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-database_codephp/)
 *     ```
       $sql = 'CREATE TABLE ' . WEBLIB_COLLECTION . " (
         barcode varchar(16) not null unique check (barcode <> ''),
         title varchar(128) not null check (title <> ''),
         author varchar(64) not null check (author <> ''),
         subject varchar(128) not null check (subject <> ''),
         description text not null,
         category varchar(36) not null default '',
         media varchar(36) not null default '',
         publisher varchar(36) not null default '',
         publocation varchar(36) not null default '',
         pubdate date not null default '1900-01-01',
         edition varchar(36) not null default '',
         isbn varchar(20) not null default '',
         type varchar(16) not null check (type <> ''),
         thumburl varchar(256) not null default '',
         callnumber varchar(36) not null default '',
         publang varchar(36) not null default '',
   
         //	pubpages int() not null default '',  should be
         pubpages int not null default 0,
   
         pubimage varchar(256) not null default '',
         puburl varchar(256) not null default '',
         pubfilename varchar(256) not null default '',
         entrydate date not null default '1900-01-01',
         publicense varchar(256) not null default 'CC BY-SA',
   
         PRIMARY KEY  (barcode),
         KEY (title),
         KEY (author),
         KEY (subject),
         KEY (isbn)
         );";
       ```
   
 * [https://wordpress.org/plugins/weblibrarian/](https://wordpress.org/plugins/weblibrarian/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Robert Heller](https://wordpress.org/support/users/robertpheller/)
 * (@robertpheller)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-database_codephp/#post-7041470)
 * This is NOT my code! ALL of the fields after ‘callnumber’ are not part of the
   base code.
 *  Thread Starter [MadUpgrade](https://wordpress.org/support/users/madupgrade/)
 * (@madupgrade)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-database_codephp/#post-7041609)
 * It’s just an unedited download from the wordpress Plugin Directory.
 * The extra colums also show up in `display_one_item_form($returnURL)`
    but not
   in `getitemfromform($barcode)`. It looks like an unfinished expantion.
 * I think the addition of a full image, and a filename for e-documents is very 
   usefull.
    Do you have plans to finis it?
 *  Plugin Author [Robert Heller](https://wordpress.org/support/users/robertpheller/)
 * (@robertpheller)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-database_codephp/#post-7041611)
 * No, it is NOT ‘_an unedited download from the wordpress Plugin Directory_‘. At
   least not from the version I maintain. This some fork of the code. Compare to:
 * [https://plugins.svn.wordpress.org/weblibrarian/trunk/includes/database_code.php](https://plugins.svn.wordpress.org/weblibrarian/trunk/includes/database_code.php)
 * The code you posted is NOT my code. Where did you get it?
 * Is there a readme.txt with this code? Are you totally sure you downloaded from
   the official WP plugin directory?
 *  Thread Starter [MadUpgrade](https://wordpress.org/support/users/madupgrade/)
 * (@madupgrade)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-database_codephp/#post-7041615)
 * my coworker, having been asked twice already, now suddenly remembers that he 
   did edit your plugin.
    sorry for that mixup.
 * Would you consider to expand your plugin with the colums he wanted?
 *  Plugin Author [Robert Heller](https://wordpress.org/support/users/robertpheller/)
 * (@robertpheller)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-database_codephp/#post-7041616)
 * I have no plans to add any new features.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘error in database_code.php’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/weblibrarian_ffffff.svg)
 * [WebLibrarian](https://wordpress.org/plugins/weblibrarian/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/weblibrarian/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/weblibrarian/)
 * [Active Topics](https://wordpress.org/support/plugin/weblibrarian/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/weblibrarian/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/weblibrarian/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Robert Heller](https://wordpress.org/support/users/robertpheller/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/error-in-database_codephp/#post-7041616)
 * Status: not a support question