[Solved] Custom block won't install
Permalink 1 user found helpfulI got a problem with my custom block I just made.
It throws a MySQL error when trying to install:
mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' content LONGTEXT, PRIMARY KEY (bID) )' at line 3] in EXECUTE("CREATE TABLE btFullWidth ( bID INTEGER UNSIGNED NOT NULL, hdl VARCHAR, content LONGTEXT, PRIMARY KEY (bID) )")
Here's my db.xml:
<?xml version="1.0"?> <schema version="0.3"> <table name="btFullWidth"> <field name="bID" type="I"> <key /> <unsigned /> </field> <field name="hdl" type="C"></field> <field name="content" type="X2"></field> </table> </schema>
Maybe anyone can help?
Thanks!

mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' content LONGTEXT, PRIMARY KEY (bID) )' at line 3] in EXECUTE("CREATE TABLE btFullWidth ( bID INTEGER UNSIGNED NOT NULL, hdl VARCHAR, content LONGTEXT, PRIMARY KEY (bID) )")
:(
My fault - Thanks!
<field name="hdi" type="C" size="30"></field>
or
<field name="hdi" type="X"></field>
The C5 docs page is at:
http://www.concrete5.org/documentation/how-tos/developers/creating-...
(Edit - posts crossed over)
I used X now.
So does that mean C always needs a size? Thought it will be VARCHAR(255) without size given?
That doesn't make any sense?