Hi all,
This is an extension of a thread below which ran yesterday in php coding forum!
But I dont expect anyone to read through the 27 entries so just gonna summarise here and see if anyone with a fresh pair of eyes today can make any suggestions!
Bascially I have two tables bid table and proposal table.
I'm trying to print to screen all the proposals made by a particular user!
The problem is that only those proposals that have bids made on them are printing to screen.
So for example if four proposals are made by a user, I want all four to be printed, however currently if only two of them have bids on them there the only ones that are getting printed.
I'm pretty sure its something to do with the group by statement as when I remove it, it seems to work fine, but I consequently lose the critical "count bids" info.
Anyway here's the code.
SELECT proposal . * , SYSDATE( ) , GROUP_CONCAT( bid.proposalid ) AS 'bids', TIME_FORMAT( TIMEDIFF( tomorrowtime, SYSDATE( ) ) , '%H hours, %i minutes' ) AS timeleft
FROM proposal
LEFT OUTER JOIN bid ON proposal.proposalid = bid.proposalid
WHERE NOW( ) < proposal.tomorrowtime
AND proposal.username = '$username'
GROUP BY bid.proposalid
Been struggling with this for a while!
If you think of anything please let me know!