i could try, but this is just a hint not your code adapted ... for july (7th month) it could look like
select
sum(datediff(case when month(bookend) > 7 then '2007-07-31' else bookend end, case when monh(bookstart) < 7 then '2007-07-01' else bookstart end))
from tablename
where 7 between...
mysql is doing only what is "told" to do - you are grouping the records by the month of booking start day ... so if the period extends to the next month(s) you will have only the day results for the month of the start
if you need correct data for all the months i think the only way is to do it...
just a guess
SELECT a.* , a_c.`catagory`
FROM
`articles` AS a
left join `article_catagories` AS a_c on a.`id` = a_c.`article`
left join `catagories` AS c on c.`id` = a_c.`catagory`
WHERE
a_c.`catagory` =4
OR c.`parent` =4
if this is not what you are looking for, maybe post table structure...
as i understand it you are talking about fulltext search? if so there is a way to setup minimum (and maximum) length for the fulltext search:
- edit the my.cnf config file, in the mysqld section add ft_min_word_length=N, where N is the desired length
- restart mysql
- rebuild the fulltext...
:-) this is realy the wrong place, you better switch to php forum
but to your problem
a) you may be getting error when requiring the same include file twice while output of error messages is supressed and you do not know the reason of not inserting data into db - use it in one general place (at...
so when selecting the concerts for the specific date use someting like this:
where date(date_sub(datetimefield, interval 5 hour)) = '2007-06-19' order by datetimefield
this way you will select everything between 2007-06-19 05:00:00 and 2007-06-20 04:59:59
if i understand it right ...
SELECT ta.MEM_ID, ta.LNAME, ta.FNAME, IFNULL(tb.YEAR, '2007'), IFNULL(tb.PAY1, 'N'), IFNULL(tb.PAY2, 'N') FROM TableA ta LEFT JOIN TableB tb ON ta.MEM_ID = tb.FK_MEM_ID and tb.YEAR = '2007'
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.