Just in case anyone has a similar problem a solution appears to be:
SELECT * FROM records WHERE id=1 AND (date > DATE_SUB('2004-03-15', INTERVAL 29 DAY)
AND date < DATE_SUB('2004-03-15', INTERVAL 0 DAY)) ORDER BY date ASC;
Hi,
I am trying to select all the records in a database table from a given date to 30 days before.
I have this:
"SELECT * FROM records WHERE DATE_SUB('2004-03-15', interval 30 day) AND id=1 ORDER BY date ASC";
For some reason this ignores the date claculation and returns all records in the...
Hi,
Can anyone tell me how I can check to see if this form field is blank on submit:
<input type='hidden' name='conn[]' id='cs' value=' '>
The problem is that javascript won't seem to allow the [] on the end of conn in the name.
ie this: theForm.conn[].value ==""; produces a syntax error.
i...
Hi,
Does anyone know if it is possible to automatically tab between fields after a valdid input has been entered.
ie if an input field will take a 2 figure number, such as 02, and someone enters that, is it possible to automatically shift the focus on to the next field?
Thanks
Hi,
Can anyone tell me the most effective way to validate the form input from one field under the following criteria.
The data inputted must be in the range 00-24. ie, I do not want anyone to input 9 it must be 09.
Obviously I could write a large set of if statements to check input, but is...
Hey, Can anyone tell me how to reset a select box to its' default value.
I have this at the moment:
var selForm = document.insert;
selForm.at.options[selForm.at.selectedIndex].value= 0;
html:
<select name='at'>
<option value=0>Choose
<option value=1>One...
Can anyone point out what I have done wrong here please:
This should hide a <div> section when a user selects either of the last 2 options in a select box.
function showDets(item){
var selForm = document.insert;
var selChoice = selForm.dt.options.[selForm.dt.selectedIndex].value...
Hi,
I want to add all the time values from one column in a table for the last 7 days of entries.
Can anyone tell me the most effective way of doing this, is there a quick an easy wy to do this with mysql or is it better to write a php function.
Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.