Forum Moderators: open

Message Too Old, No Replies

MYSQL select statement resultset

Vertical border being destroyed

         

dbarasuk

5:15 pm on Apr 29, 2008 (gmt 0)

10+ Year Member



Hello!

If you do SELECT * FROM table_name;

Sometimes I see that the left and right borders of the resultset is a bit destroyed. Does anyone know why is that? How to fix it?

regards

jatar_k

5:18 pm on Apr 29, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I can say there is little or no connection between the query and any type of html border, which is what I'm guessing you're referring to.

Is it possible that the border/table is falling apart due to an empty value?

you could provide a little more explanation as I am only guessing at what you are talking about and therefore may be completely wrong :)

dbarasuk

5:35 pm on Apr 29, 2008 (gmt 0)

10+ Year Member



I am not talking about PHP. I mean If you launch MySQL client to start issuing queries to the MySQL program.

Just if you're writting SQL statements from the mysql client command prompt. YOU get a resultset of the query with data under the columns used in the query. Columns are separated by vertical and dashed lines which sometimes on my screen are a bit destroyed, I mean a part of the dash is pushed towards the inside and I don't like that appearance since I want the dashed lines to be always straight.

I tried to increase the length of the columns by altering the table but the problem is not fixed. I mean if a column with this problem was VARCHAR(30) I tried to increase it to VARCHAR(40) but the destroyed border at the left is still there.

I hope you see the picture below (this is what I always want):
¦ ¦
¦ ¦
¦ ¦
¦ ¦
¦

but when distroyed I get:

Column
¦ ¦
¦ ¦
¦ ¦
¦

dbarasuk

5:36 pm on Apr 29, 2008 (gmt 0)

10+ Year Member



Sorry the dashed borders don't reflect what I was typing, but hope you see my idea.

jatar_k

11:52 am on May 1, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if I understand

it's just like that, when I use the command line and am logged into to mysql the borders are always all over the place

I think if I paste it into a text editor it lines up

but I am not really understanding why this matters.

rocknbil

4:32 pm on May 1, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a limitation of the system's command window and the fixed width fonts used in it. For example, if you SSH to your server and perform the command, the SSH window may fit more "columns" in the display before wrapping around than if you run the mysql command prompt locally.

If you execute a command on a narrow table - one with only a few fields - you'll see the output will remain line for line, unless the records have a lot of data. Do it with a wide table, lots of columns, and it wraps.