Jump to content

pgrevents

Members
  • Posts

    84
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

pgrevents's Achievements

Member

Member (2/5)

0

Reputation

  1. hi thanks for that but it displays the whole database but in date order is there away to show just the last seven days?
  2. well i dont get a response from the perl script without the php i have tried the perl in place
  3. Ok what I am trying to do is send an argument to a perl file to execute im making headway but there is an error here is my code <? php shell_exec('/usr/bin/php get_iplayer --info > testfile.txt'); ?> The error is getting printed to a text file thats what the > testfile.txt is the error is X-Powered-By: PHP/5.2.8 Content-type: text/html <br /> <b>Parse error</b>: syntax error, unexpected T_STRING in <b>/home/steve/public_html/get_iplayer/get_iplayer</b> on line <b>1610</b><br /> No only when I put the /usr/bin/php in the shell_exec do I get any printout whatsoever. I know this script works as I use putty to print that command is there anything on the php side to eliminate this. I think the reason it does error is cause of the usr/bin/php but thats the only line that will make the script react to anything outside shell
  4. I have another field time added which is formated like this 0 days 0 hours ago (1245170580) would there be a way of showing all up to 7 days 0 hours ago (Rand)
  5. Sorry to be such a pain with this im a newbie the changed code thows back another error == ) ORDER BY expiry DESC LIMIT 1' at line 1
  6. are you setting your session is $_SESSION['sessionname'] = $stuffvar have you tried printing your session to see if it is infact working but its your other code that isnt?
  7. Thanks for that I have tried implamenting that ill show you my code; <?php $query = mysql_query("SELECT * from programme ORDER BY expiry DESC WHERE expiry > (curdate(), INTERVAL 1 WEEK)") or die(mysql_error()); if(empty($query)){ print "NOT VALID"; } while($row=mysql_fetch_array($query, MYSQL_ASSOC)){ ?> <?=$row['pid']?><br/> Expiry : <?=$row['expiry']?><br/> <hr> <? } ?> This throws back an error which is You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE expiry > (curdate(), INTERVAL 1 WEEK)' at line 1
  8. This field is an expiry field and well each item is 30 days so how would I refine to show the last entries in 7 days
  9. I have a datetime stamp in my database how would I order only the last 7 days entries? thanks Paul
  10. silly question but is session_start(); at the top of all your pages?
  11. but the field is there i have pulled from it before. What I am needing is to sort in lets say the last 7 days
  12. im pulling it from an autogenerated file from a 3rd party so no control over it
  13. this field has 2009-06-15T16:24:00Z in it
  14. but 2009 is Y- 06 is month m- and day is -d same for the hours
  15. can i change it to that? i parsed all the information froma text file into the db
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.