gerkintrigg Posted December 17, 2006 Share Posted December 17, 2006 I'm using the following code to get the number of days remaining (limited to 30) for a record before it expires. [code]$s=mysql_query("SELECT DATEDIFF((expire+30), NOW()) AS time_in_db FROM pokes WHERE `poker` =".$row['id']." && `poked`=".$_SESSION['my_id']." ORDER BY expire ASC"); $nod=mysql_fetch_array($s); echo 'time = '.$nod['time_in_db']; $no_of_days=$nod+30;[/code]but it's not working.Any ideas?No errors are appearing, just "time=" and then nothing.Thanks in advance Quote Link to comment Share on other sites More sharing options...
btherl Posted December 18, 2006 Share Posted December 18, 2006 If no output is appearing there are two possibilities1. Your query is invalid.2. Your query is valid, but produces no results. 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.