runnerjp Posted March 17, 2010 Share Posted March 17, 2010 the code below does not echo yes. If i add the date manually () if echos yes... $date123 also echos out the date! where am i going wrong? <?php $getthreads = "Select * from daddiary ORDER BY DATE (STR_TO_DATE( `date`, '%d/%m/%Y ' )) ASC"; $getthreads2=mysql_query($getthreads) or die("Could not get threads"); while ($getthreads3=mysql_fetch_array($getthreads2)) { ?><tr <? if ( $getthreads3['date'] == date("d/m/Y") ) { echo 'bgcolor="#CAD9D9"'; }?> > <td width="10%" height="39" align="center" valign="middle"><?php echo $getthreads3['date'];?> </td> <td width="15%" align="center" valign="middle"> <?php echo $getthreads3['am']; $date123=$getthreads3['date']; $getdate= "Select * from dadreps where date = $date123"; $getdate2=mysql_query($getdate) or die("Could not get threads"); while ($getdate3=mysql_fetch_array($getdate2)) { Also when it does work it echos yes the amount of times that there are rows with same date. How could i echo yes no matter how many rows it shows? Quote Link to comment Share on other sites More sharing options...
runnerjp Posted March 17, 2010 Author Share Posted March 17, 2010 ok i forgot '' the issue i now have is after this i have if ($getthreads3['date'] == $getdate3['date']){echo 'yes';} } how would i make it so it echos only 1 yes and not the amount of yesys compared to dates in db Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.