MySQL Forums :: Stored Procedures :: Problem with stored procedures on phpmyadmin


Advanced Search

Re: Problem with stored procedures on phpmyadmin
Posted by: Andrew James ()
Date: August 17, 2016 02:35PM

The problem is that if I took out group by and then test it out by

SELECT COUNT(files.FileID) from files,Users where files.UserID = Users.UserID

the result is 4 and 4 came from where the total of files not for each file id. The call procedure actually works without group by like call getallfiles()

and the results are:

Files firstname lastname EmailAddress
chocolate bar Steve Jones jones@gmail.com
pie Michael James michael@gmail.com
milk Steve jones jones@gmail.com
milk Steve jones jones@gmail.com





If I want to count by each then I would use group by and get this result without calling stored procedure.

SELECT COUNT(files.FileID) from files,Users where files.UserID = Users.UserID group by files.FileID and the result is

" COUNT(files.FileID)
1
1
1
1"

If I call the stored procedure that has group in in like call getallfiles(); I will get an error message.

Options: ReplyQuote


Subject Views Written By Posted
Problem with stored procedures on phpmyadmin 2372 Andrew James 08/11/2016 03:20PM
Re: Problem with stored procedures on phpmyadmin 316 Peter Brawley 08/11/2016 06:41PM
Re: Problem with stored procedures on phpmyadmin 269 Andrew James 08/12/2016 12:07PM
Re: Problem with stored procedures on phpmyadmin 283 Peter Brawley 08/12/2016 12:31PM
Re: Problem with stored procedures on phpmyadmin 284 Andrew James 08/16/2016 02:37PM
Re: Problem with stored procedures on phpmyadmin 256 Peter Brawley 08/16/2016 02:52PM
Re: Problem with stored procedures on phpmyadmin 282 Andrew James 08/17/2016 11:23AM
Re: Problem with stored procedures on phpmyadmin 266 Peter Brawley 08/17/2016 12:17PM
Re: Problem with stored procedures on phpmyadmin 277 Andrew James 08/17/2016 02:35PM
Re: Problem with stored procedures on phpmyadmin 274 Peter Brawley 08/17/2016 04:19PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.