forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › & In Field Name Becomes _ In The Result Grid
- This topic is empty.
-
AuthorPosts
-
-
May 5, 2006 at 12:46 am #9669Nick_RingMember
If a query has a '&' in the field name, Windows converts it an '_' in the grid.
Execute:
SELECT (@byt & (~@byt)) & 255;
in the query tabe and the column name becomes “(@byt & (~@byt)) _255” :huh:
-
May 5, 2006 at 1:26 am #21553peterlaursenParticipant
hehe … could you explain a little bit about what this query means ? 😮
But SQLyog does exactly as you describe it. MySQL command line client does not.
Now I experienced a little more:
I create a `&&&` table with a `&&&` column (a CHAR type) and entered the value '&&&'.
Next executed
SELECT `&&&` from `&&&`;
The column name is displayed as `&` and not `&&&`.
MySQL command line does:
mysql> SELECT `&&&` from `&&&`;
+
+| &&& |
+
+| &&& |
+
+1 row in set (0.00 sec)
mysql>
Now what the issue is here Ritesh must explain … 😀
-
May 5, 2006 at 1:33 am #21554Nick_RingMember
The query is quite irrelevant – It just happened to be the query I was playing around with then found the (windows) bug. 😀
select 1 as '&';
will show an '_' as the column name, while
select 1 as '&&';
will show '&' as the column name.
select 1 as '&&&';
will show '&_' as the column name.
The problem is how Windows handle the '&' character (happens a bit in programming). Either the grid component needs to tell Windows do not use '&' as a hot key character (like in menus) or the application writer needs to do search and replace – search for '&' and replace with '&&'.
-
May 5, 2006 at 2:04 am #21555RiteshMember
Indeed, that is what happens. In Windows, drawing of character '&' changes it to menu identification. I have added this to our T-DO list. We will fix it in v5.2.
-
May 5, 2006 at 2:06 am #21556peterlaursenParticipant
I don't know if this is a Windows thing or SQLyog thing. MySQL Query Browser does correct with your queries as well as mine.
-
May 5, 2006 at 2:35 am #21557Nick_RingMember
I think it is a Window thing, as I have seen it a lot. The problem can usually (but not always) be traced down to either DrawText or DrawTextEx API calls, with the calling routine not passing in 'DT_NOPREFIX' in formatting options of these two API calls.
-
May 12, 2006 at 7:11 am #21558RiteshMember
Added in the TO-DO list of v5.2.
-
-
AuthorPosts
- You must be logged in to reply to this topic.