> "Nyström, Rasmus" writes:
> > How come the query
> >
> > SELECT
> >
> CONCAT('"',CONCAT_WS('";"',title,prio,category,program,bugdesc
> ,created,modif
> > ied,bugstatus,submitter), '"') FROM tbl_bug;
> >
> > returns something like
> > "4","4","4"
> > "10","10","10"
> >
> > while only
> >
> > SELECT
> >
> CONCAT_WS(';',title,prio,category,program,bugdesc,created,modi
> fied,bugstatus
> > ,submitter) FROM tbl_bug;
> >
> > returns the intended result except that the values are not
> confined withing
> > '"'.
> > that is
> >
> > Tough Bug,1,3,4,A very long description....
> >
> > I do understand why the second query returns what it
> returns, but the first
> > one should not return what it returns, right?
> >
> > Am I clear enough?
> >
> > I'm using 2.23.33 on Windows 2000 Server.
> >
> > / Rasmus Nyström
> >
>
>
> Hi!
>
> Please try our 3.23.35 for Windows and see if problem reccurs.
>
>
> Regards,
>
> Sinisa
I tried it now.
Not on the 2000 Server, but on my NT4 SP6
The problem still occures, let's me describe the tests.
The table looks like this:
id | int(10) unsigned | | PRI | NULL | auto_increment
title | varchar(255) | YES | | NULL |
prio | int(10) unsigned | YES | | NULL |
category | int(10) unsigned | YES | | NULL |
program | int(10) unsigned | YES | | NULL |
bugdesc | text | YES | | NULL |
created | datetime | YES | | NULL |
modified | timestamp(14) | YES | | NULL |
bugstatus | int(10) unsigned | YES | | NULL |
submitter | int(10) unsigned | YES | | NULL |
nothing special about that I assume.
There are a few strange things here.
while the query as described
SELECT
CONCAT('"',CONCAT_WS('";"',title,prio,category,program,bugdesc,created,modif
ied,bugstatus,submitter), '"') FROM tbl_bug
returns
"4";"4";""
"4";"4";""
"4";"4";""
"4";"4";""
"4";"4";""
"4";"4";""
"4";"4";""
"5";"5";""
"6";"6";""
"3";"3";""
"5";"5";""
"5";"5";""
"5";"5";""
"5";"5";""
"5";"5";""
SELECT CONCAT('"',CONCAT_WS('";"',title,bugdesc), '"') FROM tbl_bug
returns the correct values.
to long to be presented here, but I think you understand what I want.
so I does not fall on the TEXT field.
next I try.
SELECT
CONCAT('"',CONCAT_WS('";"',title,prio,category,program,bugstatus,submitter),
'"') FROM tbl_bug
and this annoyes the hell out of me. It returns
"4";"4";""
"4";"4";""
"4";"4";""
"4";"4";""
"Utloggen";"2";"1";"1";"0";"4"
"Avbryt order";"2";"1";"1";"0";"4"
"Tips";"1";"2";"1";"0";"4"
"Bakgrundsfõrg";"1";"2";"1";"0";"5"
"Fel pÕ PDF prislista";"3";"1";"1";"0";"6"
"Bekrõfta orderrad";"2";"1";"1";"0";"3"
"Tillbaka knapp";"1";"2";"1";"0";"5"
"Tillbeh÷r";"1";"2";"1";"0";"5"
"Ikoner";"1";"2";"1";"0";"5"
"Leveransbesked";"1";"2";"1";"0";"5"
"Kontantkort";"1";"2";"1";"0";"5"
That is half right half way out there.
I do not have any NULL values or anything....
The server is a NT4 Server SP6 On a pentium 133 running 2.23.35 (reporting
'3.23.34a debug' =) )
The first server I tried this on was a Win2k Server SP1 running 2.23.33
which returned the same using the first query. haven't tried the other once
there, but from what I gather I should return the same, shouldn't it.
both server where tested using Win2k Professional running the queries
through the mysql-client.
PS.
just tried the last query on the original server.
It returns the same. Except for the last row returning almost the same as
the first four.
/Rasmus Nyström
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php