Jump to content

mb81

Members
  • Posts

    120
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

mb81's Achievements

Member

Member (2/5)

0

Reputation

  1. Laffin, all the logic might be there, but that doesn't answer my question. What you are giving me is a MySQL syntax that doesn't work with the way that I have decided to layout my application. There are a couple issues with that, first of all because even though someone might be there for 7 days, they might only be using a particular room or a particular resources for 1 or 2 days, but it needs to be attached to the original reservation, so I created a table that uses their reservation id, the date, and a resource id.
  2. Cool, never had to use that before, thanks for the info, I knew there was something I was missing. Thanks! SOLVED
  3. ok den, can you showz me howz to getz a SQL requrd set with all the dates between diz and dat? P.S. I didn't know we spoke lolCat here.
  4. Well, there's no special function per se, but you could do something like this: <?php $start = '2008-02-15'; $end = '2008-03-16'; $dates = array(); for ($ts = strtotime($start); $ts <= strtotime($end); $ts += 86400) // Add one day with each iteration { $dates[] = date('Y-m-d', $ts); } print_r($dates); ?> Can you give us a little more information as to what you are trying to do? I'm guessing there may be a way to do some of your calculating within MySQL instead of having to do this all in PHP. Obsidian, that's pretty much where I went with it also after a couple of trial and errors, I found that to be the easiest and cleanest.
  5. Here is my query: SELECT COUNT(*) AS countreservations,reserveddate,resourceid FROM RESERVATIONS_reservedresources GROUP BY reserveddate,resourceid ORDER BY countreservations DESC I want to get a set of results back where only where countreservations>1 is returned. If I try to insert WHERE countreservations>1, it says it doesn't know that column If I try to insert WHERE COUNT(*)>1, it says illegal use of group function Is there any way to get just the records that have 2 for the COUNT(*)? Thanks.
  6. I need to cycle through all the dates in a date range to test for availability. This is for an online reservation system (think like a hotel, one reservation per date).
  7. Given 2 inputs of a startdate and an enddate (in standard MySQL date format), does anyone have any better ideas on how to create an array of every date that is between these two dates? Right now, I am other than converting them to integers based on timestamp, then creating an array using range, then looping through and converting them back to mysql style dates. Is there a secret function I am missing or a trick someone has used?
  8. Look at BillyBobs solution above, this should work, I do the same thing with our content management system, and I have this line: RewriteRule ^([a-z]+)$ content.php?id=$1 [L]
  9. I have to do a lot of image and other media content uploads into folders, am I going to run into any trouble if I set the CHMOD on these to 777 or is there some other setting that will allow me to upload the pictures, and view them via the browsers, and potentially delete the images from the online management system without doing 777? Thanks!
  10. yes, it's also netstat, run it as netstat -b from the command prompt
  11. Leaving a rectangle 22 x H and a 6 - 8 - 10 rightangled triangle so $H = 8 * sin( asin(6/10) ); Are you sure that the resulting triangle from when you remove the center rectangle is a right triangle? I don't think that is going to happen in most cases, so I am not sure you can apply that to every case.
  12. Pixar uses Renderman - http://renderman.pixar.com/
  13. If you want it to happen automatically, you have to do a CRON job on your server. Depending on your host, you may or may not have access to that capability.
  14. It's not the picture that is causing the problem, it's the width of whatever is holding the picture. Something is not set right on the DIV or TABLE or whatever you are using to hold the picture.
  15. mb81

    mysql syntax

    So what's your question?
×
×
  • 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.