I have a set of dates (and times), which are returned from a mySQL query.
These usually span from 1-2 months and I need to be able to separate the results (using HTML) every sunday (monday being the start of the week).
Set of timestamps....
Code: [Select]1255482000
1255483800
1255485600
1255487400
1256086800
1256088600
1256090400
1256092200
1256691600
1256693400
1256695200
1256697000
1257300000
1257301800
1257303600
1257305400
1257904800
1257906600
1257908400
1257910200
1258509600
1258511400
1258513200
1258515000
1259114400
1259116200
1259118000
1259119800
Currently the code looks like this, but having trouble getting round the logic of doing this...
Code: [Select]<?php
while ($sqlresults = mysql_fetch_array($results)) {
$compare = strtotime(date('d F Y',$laststamp)." next Sunday");
echo $sqlresults['timestamp'].'
';
if ($sqlresults['timestamp'] != $laststamp) {
if ($compare > $laststamp) {
#HTML CODE
}
}
$laststamp = $sqlresults['timestamp'];
}
?>
But at the moment it just puts HTML code inbetween every time
filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I have a method, that is supposed to open a file and write to the file, but I am having issues. Each
Table colours fail when extra row added
Hey Gurus,I got a weird problem with formating the colour of a table made in php. Everything works fine when i use 5 rows each row has an alturnative colour, but when i add the 6th row the colour
Need help making a script that moves data into acrhive table
Hi,I'm kinda new to php/mysqlAnd i wrote a simple script to store sales lead for a buisness and they are posted out into a table after they are submitted in a form. The page where you can see all your
phpMailer will not connect using SMTP
I am trying to use phpMailer with smtp:Code: [Select]$mailer = new PHPMailer();$mailer->IsSMTP();$mailer->Mailer = "smtp";$mailer->SMTPSecure = 'tls';
How do I get the row number from from an sql table query
Hi allI have a table that I query and it returns a number of rows.mysql_num_rows($query) = $totalI want to have next and previous buttons, is there a way of retrieving the current row number, and can
Oracle Text CTX_DOC.snippet slow
I have a table (FILE_TABLE) that contains a blob column (ft_file) and I have created the following Oracle Text Index on that table/file column....
batch file not building to webapps folder
Hello. I just started running Vista :P and can't seem to get my projects deployed. I found out how to run the .bat file, but my project isn't in the Apache webapps folder. I'm getting an error in
post to self
Trying to get my form to submit to itself. However I am also trying to use an image for my submit button, when I set the type='image' it will not submit to itself. Can someone help me figure out
Refining of search Criteria
Dear FriendsI need a help, I have a search page which of cars related, which has different search criteria e.g. maker, model, color, displacement etc. when i give any search criteria and click the
Problems with strings containing
Hey all,I have encountered something strange in a script. I am trying to write an XML header and then fill in the file:Code: $xmlFile = "fetchableData.xml";$fh = fopen($xmlFile,