In my project, I have table IDCA and IDCB.
I cat query sql like:
$liId=99;
select name from IDCA where stId='$liId';
And the result is:
John
Stack
Shansa
Aliya
Stock
Then I set allName of IDCB with these values.
update IDCB set allName=(select name from IDCA where stId='$liId') where stId='$liId';
But it works fail. And error is:
ERROR 1242 (21000): Subquery returns more than 1 row
Actually, I want set allName='John,Stack,Shansa,Aliya,Stock'. So who can help me?