[Solved] Custom block won't install
Permalink 1 user found helpful
Hi Folks,
I got a problem with my custom block I just made.
It throws a MySQL error when trying to install:
Here's my db.xml:
Maybe anyone can help?
Thanks!
I 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!

Try giving the C field a length or making it a X.
Thank you, I just tried it, it results in VARCHAR too and it still says
:(
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) )")
:(
Oh sorry, it worked with X!
My fault - Thanks!
My fault - Thanks!
Either of these should work:
or
The C5 docs page is at:
http://www.concrete5.org/documentation/how-tos/developers/creating-...
(Edit - posts crossed over)
<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)
Thank you, was hanging around on that page already.
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?
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?
In my experience, it always fails without a size. Maybe there is a way to make it work without, but I have yet to find it.
All right thx! Going to remember this the next time ;)