Answers blended in.... "YL" <[EMAIL PROTECTED]> wrote on 09/02/2005 04:18:27 PM:
> I've 2 basic questions. thanks for responses: > > (1) Suppose i have a table with a varchar colum named options which stores > option id's in the form > "(id1, id2, ...., idk)", where id1,... are string representations of > positive integers. Given an integer i, > I want to fetch all ID's for the records in the table whoes 'options' > value when interprets as an array, > contains integer i. What the query looks like? I do not understand your question. SQL does not have arrays. It has rows and columns and tables and lots of other things but no arrays. Programming languages have arrays, not SQL. Are you trying to get some data and populate an array with it? That's not completely a MySQL question, it's more of a question about how to create arrays from strings in your particular language. However, since there are MANY people on this list, I am sure someone will know the answer so please explain what it is you are doing, what language you are using to do it with, what your data looks like (use "SHOW CREATE TABLE", and explain what you want your results to look like. > > (2) when using mysql command to query a value of type text, the displayed > value always surrounded by lots > '-'s. My question is: How to get rid of those extras? (The following is a > tail of display result:) > template = { > b5 = resources/articles/_backups/subIndex_b5.template; > gb = resources/articles/_backups/subIndex_gb.template; > }; > }; > }; > > |--------------------------------------------------------------------------- > -------------------------------------------- > ---------------------------------------------------------------------------- > ------------------------------------------- > ---------------------------------------------------------------------------- > ------------------------------------------- > ---------------------------------------------------------------------------- > ------------------------------------------- > ---------------------------------------------------------------------------- > ------------------------------------------- > ----------------------------------------------------------+ > When using the command line client, the headers, the data areas, and the tails are each as wide as your data but they get "wrapped" to fit your screen buffer. To make the wrapping effect go away in Windows, change the Screen Buffer settings for your command shell window to something wide enough to fit your results. One way you can get to the settings is by right-clicking the window and picking "properties". Shawn Green Database Administrator Unimin Corporation - Spruce Pine