Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: piti
  • Order by date
  1. piti

    booked days per month query

    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...
  2. piti

    Disabling UnSecure IP Services

    as i do agree with thedaver, maybe the audit was just about to edit the /etc/inetd.conf and disable what was mentioned ...
  3. piti

    booked days per month query

    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...
  4. piti

    booked days per month query

    datediff(date1, date2) returns date1-date2, so just switch the CBB.bookst and CBB.bookend expressions
  5. piti

    convert varchar to date

    if nothing else, there is the date format missing in the str_to_date() function
  6. piti

    Problems quering 3 tables in one statment (GROUP BY)

    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...
  7. piti

    Three and less characters searching

    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...
  8. piti

    mysql injections and user privileges

    using the least possible privileges is only one of the methods to prevent sql injection ...
  9. piti

    query - add values to multiple tables

    :-) 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...
  10. piti

    ORDER BY - datetime

    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
  11. piti

    ORDER BY - datetime

    so you just want to have concerts having the "start date" tomorow between 00:00 and 05:00 to be displayed in the today's listing?
  12. piti

    ORDER BY - datetime

    so you want to have day events between 00:00:00 to 05:00:00 placed after those in the interval 05:00:00 to 23:59:59?
  13. piti

    Postcode Regexp

    i think putting the char part in brackets, either () or [], should do the job ^[E|EC|EN|N|NW|SE|SW|W|WC][1-9][0-9]?
  14. piti

    TABLE JOINS

    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'
  15. piti

    Select statement

    maybe you were told, that your statement does not exactly do what has been requested ;-) - assuming the result should be only one column ...
  16. piti

    Restore a table from db.

    try this http://www.quest.com/litespeed-for-sql-server/
  17. piti

    REGEXP - Checking Postcode

    try ^S[0-9]. but that would match anything that starts with S followed by at least one number ...
  18. piti

    Amending netmask in RedHat ES4

    well ... looks nice, but i personaly would use this approach 1. "at" to schedule the network restart 2. "ifconfig" to change the settings and bring interface down/up i think this is less failure jeopardized ...
  19. piti

    Amending netmask in RedHat ES4

    i would recomend first run some shell script that changes the network setup (ifconfig, eth down and up), while having scheduled the network restart in about 5 minutes or so - this way you can check if the setup is working - you can reach the network in- and outbound - and if not, everything is...
  20. piti

    Creating a Temporary Table for searches

    you should not use just excerpts from the posts, that might lead to something working ;-) so once again - temp tables exists for the connection you used to create them and are valid only until you drop that connection (or you explicitly drop the table) so when you try that truncate statement...

Part and Inventory Search

Back
Top