Title: Call procedure return nothing but it returns when execute in mysql 5.5
Tags: php;mysql;stored-procedures
Question: I am working on a procedure for my project but I got a problem like the pictures below.

This is when I call that procedure with mysql code but then it shows nothing

It returns the result I want when I execute it with php admin interface


And here is my procedure 

```DELIMITER //
CREATE PROCEDURE baocaodoanhthunam(IN nam integer)
BEGIN
DECLARE thang integer;
DECLARE countcb integer;
DECLARE doanhthu decimal;
SET @thang = 1;
create temporary table test_1 (thangg int, socb int, doanhthuu decimal);
while @thang <= 12
do
SELECT COUNT( * ), SUM(result.tonggiave) into @countcb, @doanhthu
FROM (
SELECT cb.MACHUYENBAY, SUM( ctdv.GIAVE ) AS tonggiave
FROM chuyenbay cb, dondatve ddv, chitietdatve ctdv, ve v
WHERE YEAR( cb.THOIGIANBAY ) = nam
AND MONTH( cb.THOIGIANBAY ) = @thang
AND ctdv.MAVE = v.MAVE
AND v.MACHUYENBAY = cb.MACHUYENBAY
AND ctdv.MADONDATVE = ddv.MADONDATVE
AND ddv.DATHANHTOAN =1
GROUP BY cb.MACHUYENBAY
) AS result;
insert into test_1 values (@thang, @countcb, @doanhthu);
set @thang = @thang + 1;
end while;
select t.thangg as 'Tháng', t.socb as 'Số chuyến bay', t.doanhthuu as 'Doanh thu' from test_1 t;
END //
DELIMITER ;
```

So my question is in mysql 5.5, does it support create temporary table or not?
If it does, then why I got this problem?
Thanks guys for your help! I'm very appreciate for you help.

Comment: you are mixing `socb` and `countcb`, is that correct?

Comment: I declare countcb variable to select count(*) into it, then insert it into the temporary table. The socb is just the name of the column in that temporary table.



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 0, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:05/25/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<php><mysql><stored-procedures>', 'Title': 'Call procedure return nothing but it returns when execute in mysql 5.5', 'ViewCount': 36, 'id': 44177455, 'user_AboutMe': None, 'user_AccountId': 8145145.0, 'user_DisplayName': 'Châu Minh Phúc', 'user_Reputation': 195.0, 'user_Views': 29.0, 'user_id': 6134008.0}}