You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jason van Zyl <jv...@apache.org> on 2001/04/19 22:49:39 UTC

Re: MySQL and BLOB.

Jeremy Cowgar wrote:
> 
> I have downloaded the TDK system today and tried to create a few Peer's with
> assocated screens.
> 
> Whenever I specify BLOB in the database.xml file, and issue a
> build-project.sh init ... MySQL fails the creation of my table. It displays
> the SQL statement, and it looks like this:
> 
> CREATE TABLE task (
>   ....
> myBlobField,
> );
> 
> It does not specify any type for the BLOB. If I add a size="255" or
> something in the database.xml, it looks like:
> 
> myBlobField(255)
> 
> Can anyone help me out here?

If you look in the conf/torque/templates/sql/base/mysql/db.props

You will see that there is no mapping for BLOB. Typically we
have used the VARBINARY JDBC type which in the mysql db.props
file maps to MEDIUMBLOB in mysql. But you can change these
mappings to whatever you desire.

> 
> Thanks!
> 
> Jeremy - jcowgar@bhsys.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: #set ["sdfsdf","sdfsdf"] -- Access Entry #2?

Posted by Jason van Zyl <jv...@apache.org>.
Jeremy Cowgar wrote:
> 
> In my .vm file, I said this:
> 
> #set ($statusText = ["Untouched","Completed","Waiting on Someone Else"])
> 
> How do I access just element number 2 for instance?
> 
> $statusText.elementAt(2), $statusText(2), $statusText[2] was all I could
> come up with and none worked.

Internally velocity makes an ArrayList with the [..] operator.
So

$statusText.get(1)

is what you want.

> 
> Thanks!
> 
> Jeremy - jcowgar@bhsys.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: #set ["sdfsdf","sdfsdf"] -- Access Entry #2?

Posted by "Henning P. Schmiedehausen" <ma...@mail.hometree.net>.
"Jeremy Cowgar" <jc...@bhsys.com> writes:

>In my .vm file, I said this:

>#set ($statusText = ["Untouched","Completed","Waiting on Someone Else"])

>How do I access just element number 2 for instance?

>$statusText.elementAt(2), $statusText(2), $statusText[2] was all I could
>come up with and none worked.

jvz solved this one for me:

$statusText.get(2)

	Regards
		Henning

	
-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


#set ["sdfsdf","sdfsdf"] -- Access Entry #2?

Posted by Jeremy Cowgar <jc...@bhsys.com>.
In my .vm file, I said this:

#set ($statusText = ["Untouched","Completed","Waiting on Someone Else"])

How do I access just element number 2 for instance?

$statusText.elementAt(2), $statusText(2), $statusText[2] was all I could
come up with and none worked.

Thanks!

Jeremy - jcowgar@bhsys.com




---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org