Title: SQL Error on Install with table creation
Last modified: November 1, 2019

---

# SQL Error on Install with table creation

 *  Resolved [ryanandersonweb](https://wordpress.org/support/users/ryanandersonweb/)
 * (@ryanandersonweb)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/sql-error-on-install-with-table-creation/)
 * Line 45 of the opt/OptProperties.php contains an error that stops the opt_properties_float
   table from being created. Attempted on 2 installs on 2 different servers.
 * I created the table manually instead and now the plugin is working as expected.
   That line contains a variable called ‘$type’ which references ‘protected $sqlType
   = ‘undefined’;’. The value type in the table creation actually needs to be ‘decimal(
   10,2) NULL default NULL’.

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

 *  Plugin Author [writ3it](https://wordpress.org/support/users/writ3it/)
 * (@writ3it)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/sql-error-on-install-with-table-creation/#post-12101326)
 * [@ryanandersonweb](https://wordpress.org/support/users/ryanandersonweb/) Thank
   you for detailed bug report. Which PHP version are you using? I will prepare 
   bugfix.
 *  Thread Starter [ryanandersonweb](https://wordpress.org/support/users/ryanandersonweb/)
 * (@ryanandersonweb)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/sql-error-on-install-with-table-creation/#post-12101341)
 * Hi there, this is on PHP Version 7.3.
 * Thanks
 *  Plugin Author [writ3it](https://wordpress.org/support/users/writ3it/)
 * (@writ3it)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/sql-error-on-install-with-table-creation/#post-12108658)
 * Hi
 * thank you for the information. I need few days for preparing the bugfix.
 *  Plugin Author [writ3it](https://wordpress.org/support/users/writ3it/)
 * (@writ3it)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/sql-error-on-install-with-table-creation/#post-12112453)
 * [@ryanandersonweb](https://wordpress.org/support/users/ryanandersonweb/)
 * Hi,
 * i tried to reproduce error. There is my test (I decided to confirm every issue
   with test) [https://github.com/writ3it/the-best-price-filter-for-woocommerce/blob/bug-1/tests/Features/OptFloatPropertiesTableCreationTest.php](https://github.com/writ3it/the-best-price-filter-for-woocommerce/blob/bug-1/tests/Features/OptFloatPropertiesTableCreationTest.php).
   I used php 7.3.10. Test is passed so the error is at another place.
 * I belive that problem is in SQL. Diffrent servers can use diffrent standards 
   of SQL Queries. Could you send me a log file generated while you are installing?
 * You can generate file following instructions below:
    1. Remove plugin (and remove
   table manually in DB). 2. Change WP_DEBUG in wp-config.php to TRUE. 3. Add line
   define( ‘WP_DEBUG_LOG’, true ); at wp-config.php 4. Try to install plugin. 5.
   Send me (writ3it@gmail.com) wp-content/debug.log
 * Sometimes debug.log doesn’t contains errors from table creation (it’s strange)
   so, please attach me dump of $sql content in OptProperties::create method and
   information about your mysql server (version).
 *  Plugin Author [writ3it](https://wordpress.org/support/users/writ3it/)
 * (@writ3it)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/sql-error-on-install-with-table-creation/#post-12239183)
 * Hi [@ryanandersonweb](https://wordpress.org/support/users/ryanandersonweb/)
 * I released new version with public properties. I am convinced that change makes
   correct overriding while inheritance. Please, let me know if it solved the problem.

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

The topic ‘SQL Error on Install with table creation’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/the-best-price-filter-for-woocommerce_c1c1c1.
   svg)
 * [The Best Price Filter for Woocommerce](https://wordpress.org/plugins/the-best-price-filter-for-woocommerce/)
 * [Support Threads](https://wordpress.org/support/plugin/the-best-price-filter-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/the-best-price-filter-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-best-price-filter-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-best-price-filter-for-woocommerce/reviews/)

 * 5 replies
 * 1 participant
 * Last reply from: [writ3it](https://wordpress.org/support/users/writ3it/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/sql-error-on-install-with-table-creation/#post-12239183)
 * Status: resolved