Mysql Using INNER JOIN to select multiple tables?

Note that CONCAT_WS will separate your fields and CONCAT will just smash then together.

SELECT @prod:= CONCAT_WS(',',prod_product. Field1,prod_product. Field2,...) ,@comment:= CONCAT_WS(' ',pub_comment.

Field1,pub_comment. Field2,....) FROM prod_product INNER JOIN pub_comment ON (prod_product. Id = pub_comment.

ItemId) WHERE prod_product. Id = 7744 Note that CONCAT_WS will separate your fields and CONCAT will just smash then together.

Tnx john, I love it ;) – Hamid Apr 13 at 5:54 Oh, I must warn you about concat_ws, it gave me a nasty collation error where the table was in LATIN1 and the system is set to UTF8 then the result will be in UTF8, which will not be INSERTed into a LATIN1 table. If you get this workaround is to use CONCAT(field1,' ',field2,' '...). – Johan Apr 14 at 8:08.

Execute two queries: select * from prod_product WHERE prod_product. Id=7744 and select * from pub_comment WHERE pub_comment. ItemId=7744 A single query always return single rows containing two table fields.

Anyway: what is the problem of having columns together in a single row? If you have problems with their names you can use aliases.

– Marco Apr 12 at 10:38 @user703617: if you give us some detail, we can help you better :) – Marco Apr 12 at 11:09.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions