mysql Using INNER JOIN to select multiple tables? -


i want select fields of several table , fetch result separate mysql return rows together:

select prod_product.*   ,pub_comment.*  prod_product  inner join pub_comment on (prod_product.id = pub_comment.itemid)  prod_product.id=7744 

is there way fetch each table rows separately?

i try @prod:=prod_product.*, @comment:=pub_comment.* mysql didn't allow me store more 1 row.

select @prod:= concat_ws(',',prod_product.field1,prod_product.field2,...)   ,@comment:= concat_ws(' ',pub_comment.field1,pub_comment.field2,....)  prod_product  inner join pub_comment on (prod_product.id = pub_comment.itemid)  prod_product.id = 7744 

note concat_ws separate fields , concat smash together.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -