Jump to content

TomFromKWD

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

Everything posted by TomFromKWD

  1. Brilliant stuff cheers for all the support
  2. one final note I've just thought about after discussing it with the user is at what time will it recognise the date change to the new day Is it going to run off GMT, or the viewers time zone, or another time zone IE UCT,PCT etc?
  3. mysql_query ("SELECT *,DATE_FORMAT(displaydate,'%Y-%m-%d') FROM `2011-09` WHERE displaydate <= CURDATE() ORDER by day_id DESC") or die(mysql_error()); the above worked i just forgot to put my &getimages= on the front like a fool Thanks for all the support guys Youve been immense as always
  4. on that try weve gone back to it kicking out the original error and no die messgae (the or die is still in the code)
  5. its telling me "Unknown column 'thedate' in 'where clause'"
  6. it is there though, and without the date alterations im trying to make and just using the following alone works, but obviously is showing EVERYTHING in the table, including that set with a date for the future $getimages=mysql_query ("SELECT * FROM `2011-09` ORDER by day_id DESC");
  7. the error is as follows Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in "path"/2011-09.php on line 49 and unfortunately the issue persists after the above supplied code could it be to do with how I am storing the date in question in the database? and if it helps the full bit is now as follows: <?php include 'connection.php'; $getimages=mysql_query ("SELECT *,DATE_FORMAT(displaydate,'%Y %m %d') as thedate FROM `2011-09` WHERE thedate <= CURDATE() ORDER by day_id DESC"); while ($images=mysql_fetch_array($getimages)) { echo " " .$getimages['codeopen']. "" .$getimages['code']. "" .$getimages['codeclose']. ""; } ?>
  8. I am trying to get the SELECT query to take a date from a field in the database called displaydate and ensure it only shows entries that have a displaydate of the date today or earlier <?PHP mysql_query ("SELECT *,DATE_FORMAT(displaydate,'%Y-%m-%d' as thedate FROM `2011-09` WHERE DATE_SUB(CURDATE(),INTERVAL 31 DAY) ORDER by day_id DESC"); ?> the above code is just kicking out an error so I assume I've got lost somewhere but not sure where can someone please help me correct what I have wrong and explain WHY it is wrong
  9. Hi guys, I have a feeling the answer to this will be something incredibly simple I will be amazed I have failed to overlook but lets see. I have a database currently storing images as BLOB, it appears to be holding them fine, my upload page works fine to put images there etc The issue is coming when trying to display the images on an alternate page. I am using the code below, and it seems to recognize the field, however it is not displaying an image, it is displaying code. I have a feeling I need to add something to my headers to allow the page to show the images, but am not 100% sure. If someone could let me know what I am missing it would be great. Thanks in advance. <? include "config.php"; $query = mysql_query("Select * FROM app_images WHERE image_month='test' ") or die(mysql_error()); while ($row = mysql_fetch_array($query)) { echo " " .$row['image']. " <br /><br />";} ?>
×
×
  • 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.