Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Dates - Detect Groups Of 7 Days


i'm developing a reservation system for a vacation house. the owner has specified that the place can only be rented by the week, check-in is on saturday, then check out must be on some following saturday (doesn't matter how many weeks as long as check-out is on a saturday). i tried to figure out if the user has selected spans of seven days (rented it for 1,2,3 weeks etc...) this way: PHP Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Dates Of $day In The Next $n Days
how would I go about working out the dates (timestamps) of the day $day (e.g. Monday, Tuesday, &c) in the next $n days. So if $day was Monday and $n 28 I would want to find out the dates in the next 28 days that are a Monday.

The problem is that I am not sure about the logic side of the problem. A crude solution that I can think up is doing something like PHP Code:

View Replies !
Days Between Two Given Dates
I have two variables which look like:

$begin = "23-08-05"
$end = "26-08-05"

Now i want also to know the dates between them.

24-08-05
25-08-05

How can i do this?

View Replies !
Calculating Days Between Two Dates
I need to calculate the numbers of days (only the number of days) between two days, one a variable $row['user_cp_name'] in the format MM/DD/YY, and another, the current time. I've tried a bunch of tutorials on the internet and none seem to work properly.

View Replies !
Number Of Days Between Two Dates
I have spent forever trying to figure this out.. There has to be a simple way. My dates are in the format m-d-y

06-22-07

I want to know the number of days between 05-23-07 and 06-22-07. this should equal 30. I am trying to figure out how to get that with PHP.

View Replies !
Business Days B/w Two Dates
How do I count the no.of business days between two dates in php.

View Replies !
Days Between Dates Need To Remove -
ive got this SQL, and it works. But i get a - before each number! Its just so i can see members who have been inactive for over xx days. Code:

View Replies !
Calculate Number Of Days Between 2 Dates
How can I calculate the number of days between 2 dates in PHP?

View Replies !
Retrieve Number Of Days Between Two Dates
I am trying to write a script that grabs todays date and then counts the number of days between today and a date in the future. Both the future date and the number of days interval are retrieved from a database (MySQL). PHP Code:

View Replies !
Calculate Number Of Days Between Two Dates
I have people posting ads and when the ad is posted I have two fields populated at that time:

date_created
date_expired

With the date expired being 7 days after the date created. Both are in this format: 03/12/07

What I am doing is preventing someone from posting more than one ad per 7 days. I'm validating against their email address for that. But I want to display the date that they would be eligible as well as determine if they are eligible to post or not which would require comparing today's date with probably using the now() function against the date_expired in the database. If the today's date is past then no problem. If not, then it would display an error. Code:

View Replies !
Dates, Daylight Savings And Net Days Worked
I'm trying to mimic the functionality of netdaysworked in excel. The
code below works, except when the date starts during daylight savings
time. what is the number of seconds in a day for a daylight savings
day?

for ($dayval = $startdate; $dayval <=$enddate; $dayval+=$oneday){
if (date(I,$dayval)==0){
echo("daylight savings time<br>");
}

if(date(w,$dayval)==0){
$daysworked = $daysworked+0;
}
elseif(date(w,$dayval)==6){
$daysworked = $daysworked+0;
}
else{
$daysworked++;
}
echo("first day: ".$dayval." number of days ".($dayval/86400)."
lastday : ".$lastday."day of week :".date(w,$dayval)."date: ".date("m-
d-Y",$dayval)." days worked: ".$daysworked."<br><br>");
}

View Replies !
Subtract Dates And Count The Amount Of Days Between Them?
Is it possible to subtract dates so you can count the amount of days between them?
If so, how?

View Replies !
Compare 2 Dates Problem (select * From 2 Days Ago)
I am having a problem with comparing 2 dates with eachother. I wan't to select everything from a table from today and 2 days ago. PHP Code:

View Replies !
Dates - Mysql Database Older Than 7 Days
I would like to delete all the records in mysql database that is older than 7 days.
How do i go about selecting it in the database ( currentdate - 7).

View Replies !
Determining Total Of Days, Hours And Seconds Between Two Dates
If i have two timestamps, is there a built in function to give me the different between the two as days, hours and seconds?

View Replies !
Working With Dates - Set Up A Cron Job That Will Close All Auctions That Are 10 Days Old
I am writing a new auction script for my website and I have everything working except closing the auctions. I have the database set up to record the start time like this:

Field      Type          Default
time     datetime      0000-00-00 00:00:00

I want to set up a cron job that will close all auctions that are 10 days old.  My only problem is I don't know how to write the code the find the 10 day cutoff.  I know I need to somehow take today's day and subtract 10 days from it but I can't seem to find out how.

My plan is once I find that code I will then take that variable and compare it to the time in the database with >.

View Replies !
How I Could Compare Two Dates To Find The Number Of Days That Seperate Them.
I was wondering how I could compare two dates to find the number of days that seperate them. For instance, after a user signs up to my website, they would see a specific message for only a week. Obviously this is easy if they signed up on the 14th and today is the 16th, but what about if they signed up on the 29th, then I need to figure out for the next month.

View Replies !
Offering Dates And Booked Dates In A Table As DATE Datatype Using MYSQL.
Availability dates in offering dates except booked dates. For Example: Offering dates are :

01-09-2005 to 27-09-2005
01-11-2005 to 30-11-2005

Booked dates are :

10-09-2005 to 23-09-2005

Availability dates should be

01-09-2005 to 09-09-2005
24-09-2005 to 27-09-2005
01-11-2005 to 30-11-2005

I am storing offering dates and booked dates in a table as DATE datatype using MYSQL.
So, I want the above mentioned availability dates as a result.

View Replies !
Unique Groups
I realize this is more of a SQL question than a PHP question but this goroup sees much more traffic than the SQL groups and I happen to know there are some good SQL people in here, so here is my problem.

I need to get a count of unique "groups" of records.

example:

select table1.group, table2.animal
from table1, table2
where table1.ID = table2.table1.ID

returns

group1 frog
group1 mouse
group1 cat
group2 frog
group2 horse
group2 cat
group3 frog
group3 mouse
group3 cat

I need to return the count of the unique groupings...

2 - (frog, mouse, cat) and (frog, horse, cat)

View Replies !
How To Create A Groups
I want to create a groups,which is like in Yahoo groups. Please help me how to code for that.Give an example to create the groups.

View Replies !
Radio Groups
I have a database which holds data to say On or Off, i have a form with a
radio group called status. I can change the status and submit it to the
database fine. But how do u get the radio group to tell me if it's on or
off? by checking the correct button?

View Replies !
Yahoo Groups
I want to to create virtual groups exactly like Yahoo Groups or Google Groups. Each group has its own hidden forums, Gallery category, Chat page (to easily integrate with your own chat solution), and more Board administrators can limit the number of groups one user can create or be an owner of. Group owners have full forum control over their groups. Groups can either be public or private and can have either moderated or un moderated group joins.

View Replies !
Joining Meeting Groups
What I am attempting to do with PHP is make a web form that will allow users to join meeting groups, and then give the group leaders away to see who have joined there group. My server has mySQL and I know I sill need a database. I have not worked with PHP before so I am at a bit of a loss.

View Replies !
Paging Recordsets In Groups Of 10
I am trying to display navigation links at the bottom of a page, hoping to show them in groups of 10, displaying 15 records per page, but with the first and last pages showing as links as well, so the user doesn't have to cycle through "next and next" to get to the last page. Code:

View Replies !
How To Spererate Groups Of Results?
I have a query like this:

$query="SELECT * FROM agents where office_name='florida'
or office_name='texas' or office_name='london'";

When I display the results....it lists them all togther....how can I add a graphic or line seperating each group? Code:

View Replies !
Framework: Users, Groups, PMs, ...
I am wondering if there is already an open source framework out there (or which exsiting one with possible additions would come closest) to create sites with social networking aspects:

- user registration / auth (should scale 1M+)
- user profiles
- groups (should scale 100k+)
- users can belong to multiple groups
- users can make "friends"
- users can send private messages
- each group can have mods/admins
- "invite friends" via email to a group
- easy template customization (sitewide or groupwide)

I've found frameworks with nice user login functionality but was missing the group functionality. I know there are fully powered scripts out there to do this but I'd like to start with basic functionality and extend it from there.

View Replies !
Two Sets Of Radibotton Groups
I have two sets of radibotton groups like:

1 2 3
X Y Z .

i can select either one from each group.That means 1&X,1&Y 1&z,2&x,2&y..like that.

If i select the combination 1&x i need to get a rand article and its details from the category(1) if i select the combination 2&x i need to get a rand article and its details from the category(4) Code:

View Replies !
SQL: Getting Groups With A Count From 2 Tables
I have 2 tables, called "hits" and "clicks".

The hits table has a collection of hits, each dated and associated with an affiliate ID.
hitID (autoinc,prim) ¦ affiliateID ¦ datetime

The clicks table is the same - it's a collection of clicks, each dated and associated with an affiliate ID. clickID (autoinc,prim) ¦ affiliateID ¦ datetime

Given an affiliate ID number and a date range, I want to get a recordset grouped by date, with a COUNT() of the hits and clicks. Code:

View Replies !
Problem With Radio Groups
No matter what I do My radio buttons always have the value 'YES' even if I select 'NO'. I have 4 questions with YES/NO answers, users check a radio box and submit the answers to a db. Code:

View Replies !
Dates In Range Falling Between Existing Dates
The latest quandry I have is that I need to:

a: check whether any dates in a date range entered by a client in a form (datefrom, dateto) conflict with any existing date ranges already in the database.

-this is a check to see whether the dates that a customer is trying to book are not already booked-
Obviously its easy to get the numbers out of the database (i.e. 28/12/2006 or whatever format) and from the form but how to I convert this 'range' actually into a range I can loop through that will return true if any of the dates are the same (i.e. already booked)?

b: is similar in that I want to check how many of the clients entered dates fall into the pre assigned high, mid and low season ranges in the database and multiply each of those days by the corresponding price.

View Replies !
Sorting Query Results Into Groups
I have a 'staff' table with a column 'status', corresponding to a
'statuses' table with the appropriate titles (eg 1 | Editor in Chief).
I want to display on the page the headings (the titles from statuses)
along with all of the staff members with that status ID.

I've attempted this using a query for each possible status, which I
figure was pretty inefficient (plus it didn't work properly). The best
I could do manually was to just display a list of staff and their
statuses sorted in order of the title ranks.

View Replies !
MySql - Outputting Results In Groups
I want to output mysql data by groups (states). However each time php/mysql comes to a new state in the results I want it to print the state name before putting the results. Does php have some sort of memory function to recognize when the state has changed?

View Replies !
Splitting Array Into Groups Of Tens
I'm trying to write this script in PHP that will get search the database and list a group of site in groups of ten, is there any function in PHP or a sql query in MYSQL that can do this? I basically need to split the results in groups of ten, and then have a next and previous link.

View Replies !
Multiple Radio Button Groups - Please Help! :)
I'm having a problem with multiple radio button groups within a while
loop. I have the page made so it pulls from a database the row values
- one of which is a Y or N value. I have a radio button group for the
Y and N value for each row of the database that gets pulled but only
the last row will populate the value retrieved from the db. I know
that I have to create a unique name for the radio buttons for each row

View Replies !
Setup Usenet Groups Within PhpBB
I'm just curious if anyone knows of a program that'll allow phpBB to
link or sync to NNTP feeds (usenet or newsgroups).

View Replies !
PEAR HTML_QuickForm Error With Groups
I have a form built with HTML_QuickForm which runs without any bugs on one server but I get an error when I try to run it on another server. The error is in the onQuickFormEvent() member function of the HTML_QuickForm_group class in QuickForm/group.php file.

Everything as far as I can tell is exactly the same on the two servers... all the same PEAR packages are installed at the same updated versions. What could be causing this error?

View Replies !
Displaying Multiple Types Of Groups
i am trying to figure out how to display the following:

PARENT GROUP 1 SEPTEMBER 2007
main name of child group 1 CHICAGO
child group 1 item 1
child group 1 item 2
child group 1 item 3

main name of child group 2 TUCSON
child group 2 item 1
child group 2 item 2
child group 2 item 3

PARENT GROUP 2 OCTOBER 2007
main name of child group in GROUP 2 El PASO
child group 1 item 1
child group 1 item 2
child group 1 item 3.

View Replies !
Open Source Forwarding/Groups System
Heres my code: Code:

$eTime = array(&#3912;:00pm',&#3912;:30pm',&#391;:00pm',&#391;:30pm',&#392;:00pm',&#392;:30pm',&#393;:00pm',
&#393;:30pm',&#394;:00pm',&#394;:30pm',&#395;:00pm',&#395;:30pm','',&#397;:00pm',&#397;:30pm',
&#398;:00pm',&#398;:30m',&#399;:00pm',&#399;:30pm',&#3910;:00pm',&#3910;:30pm',&#3911;:00pm',&#3911;:30pm',&#3912;:00am',
&#3912;:30am',&#391;:00am',&#392;:00am',&#393;:00am',&#394;:00am',&#395;:00am',&#396;:00am',&#397;:00am');
foreach ($eTime as $value) {
if ($time2 == $value) {
$selected = "selected";
} else {
$selected = "";

View Replies !
PHP-Javascript Method For Auto-selecting Checkbox Groups
I am producing a form using PHP on the back end and Javascript on the
front end. The resulting script will come to the browser as follows:

Code: ( text )

View Replies !
Http://groups.google.com/group/comp.lang.php
Methods & Tools is a free e-newsletter for software developers,
testers and project managers.
Summer 2007 issue's content:
* Agile Tool Selection Strategy for Web Testing Tools
* What's Wrong with Agile Approaches
* Mocking the Embedded World: Test-Driven Development, Continuous
Integration, and Design Patterns
* Personal Quality Management with the Personal Software Process

60 pages of software development knowledge.

View Replies !
Grouping MYSQL Queries In Alphabetical Groups And Displaying
I have a SELECT statement that pulls out a list of titles, URLs and descriptions and sorts alphabetically. Fine.

I want to group those titles, URLs and descriptions in alphabetical groups (titles beginning with A, titles beginning with B......titles beginning with Z).

Then I want to display each one of those groups in various places on the page.

The SELECT statement looks like this: Code:

View Replies !
Make Menu Items Visible Different User Groups
I have created a humble CMS sort of thing where I have users logging in and out. And there is of course me, the admin. I am working on a menu system where I first create menus and then add menu items into them. Code:

View Replies !
Manipulate Data From A Form With Multiple Radio Button Groups
could you perhaps help me out with this, trying to manipulate data from
a form with multiple radio button groups.

I have a loop..

for ($i = 1; $i <= $num; $i++) {

...then trying to use $i like this but it doesn't work..

import_request_variables('p', 'p_');
$who = $p_radio$i;

...also tried this but no luck..

$who = $_POST['radio$i'];

Anyone? Here's a snippet of the form:

<div class="fileattachment" id="fileatt1">
<input type="file" name="fileattachment1">
<input type="radio" name="radio1" value="Bob" checked>Bob
<input type="radio" name="radio1" value="Joe">Joe
</div>
<div class="fileattachment" id="fileatt2">
<input type="file" name="fileattachment2">
<input type="radio" name="radio2" value="Bob" checked="checked">Bob
<input type="radio" name="radio2" value="Joe">Joe
</div>

View Replies !
How To Compare 2 Dates In Mysql As Mysql Treats Dates As String ?
I'm trying to compare two dates in MYSQL. But its not treating the dates as numbers, but as strings. I try using strtotime but that did not work.

View Replies !
Get Dates Between Two Dates, Then Add To Table
I've got a form that inserts data into a database. Basically what it sends is a sets of dates. What I'm wanting is another set of inputs that also sends some dates. But before it adds them to the database I want to query the dates and find all of the dates between the two given ones and add them to the database as well. Code:

View Replies !
How Do You Get A List Of All Dates Between Two Dates More Than A Day Apart?
Say you have two dates, 2005-01-01 and 2005-01-24. I want to get a list or
array or all the date between and including those two dates.

I want to include this list in a query so I need it in a format like:
&#392005;-01-01', &#392005;-01-02',...

View Replies !
Find Dates Between Two Given Dates
is there any way to find dates between to given dates. ie, suppose it is given 01-01-2006 and 04-01-2006 (in dd-mm-yyyy format), want to print the dates from 01-01-2006 to 04-01-2006.

View Replies !
How Do You Add 7 Days To Now()?
How do you add 7 days to the now() function stored in database as 00-00-00 00:00:00

View Replies !
Last 7 Days
I am trying to run a query to get the last 7 days in the following format: Code:

<a href="roundup.php?news_date=20060523">Tuesday, May 23, 2006</a><br>
<a href="roundup.php?news_date=20060522">Monday, May 22, 2006</a><br>
<a href="roundup.php?news_date=20060521">Sunday, May 21, 2006</a><br>
<a href="roundup.php?news_date=20060520">Saturday, May 20, 2006</a><br>
<a href="roundup.php?news_date=20060519">Friday, May 19, 2006</a><br>
<a href="roundup.php?news_date=20060518">Thursday, May 18, 2006</a><br>
<a href="roundup.php?news_date=20060517">Wednesday, May 17, 2006</a><br>

View Replies !
How To Get -7 Days
how can i query the last seven days of my table

(table )waytogo
id (int auto increment) | dates (datetime format)
1 | 2005-11-23 08:54:32
2 | 2005-11-21 09:32:45
3 | 2005-11-12 12:43:22
4 | 2005-11-19 02:30:00

etc...

View Replies !
OS Detect
would it be possible to detect the client's OS system with php?
i don't need much detail, only if its a Windows, a linux or a macintosh
system.

View Replies !
How To Detect Bug ?
how i know my site got how many bugs? is it any technique to find it out?

View Replies !
Possible To Detect ISP
i know with php you can detect a lot of things about the user such as their IP, broswer and even screen resolution but is it possible to detect their ISP too and maybe even their exchange? I have tried googling for the code but i haven't found any.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved