Wondering if somebody can help me..
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 if only two of them have bids then there the only ones getting printed to the screen which is no good.
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 .... echo "<td>" . count(",",explode($row['bids'])). "</td>";
Anyway if anybody can think of anything please let me know!