User Profile

Collapse

Profile Sidebar

Collapse
Botondus
Botondus
Last Activity: Mar 10 '08, 06:53 PM
Joined: Jul 11 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Botondus
    replied to Date calculation in php
    in PHP
    Doh. No it's supposed to be like this:
    [CODE=sql]"SELECT * FROM cust_domain WHERE TO_DAYS(expiry_ date) - TO_DAYS(NOW()) = 60"
    [/CODE]

    Try something like this. Fill in the missing specific info like fields etc. With this code you should have in $contract all the info from those cust_domains whose contract will expire exactly 60 days from the current date.

    [PHP]
    <?php

    ...
    See more | Go to post

    Leave a comment:


  • Botondus
    replied to PHP / MySQL relevance in searching
    in PHP
    So if you use the IN NATURAL LANGUAGE MODE option it should give you only 1 result: Italian Food, from that particular list.

    Anyway you can use something like:
    [CODE=sql]
    SELECT ... MATCH () AGAINST() as score from .... WHERE MATCH () AGAINST () order by score desc;[/CODE]

    And use only the first x rows, that contain the x most relevant results, if you don't want to show results with low relevance....
    See more | Go to post

    Leave a comment:


  • Botondus
    replied to Login Security Code
    in PHP
    Found in 2 minutes using the almighty google:

    http://www.google.com/search?hl=en&q...pt&btnG=Search

    http://pear.php.net/package/Text_CAPTCHA
    http://www.cocoavillagepublishing.co...s/php/scripts/...
    See more | Go to post

    Leave a comment:


  • Botondus
    replied to Date calculation in php
    in PHP
    This will almost always be true because TO_DAYS(NOW()) should be lower then TO_DAYS(expiry_ date) and you get a negative value which is almost always <= 30 (except when the contract is already expired). Invert it.




    How is this code working fine exactly? What does it do and what did you expect it to do?...
    See more | Go to post

    Leave a comment:


  • Botondus
    replied to Date calculation in php
    in PHP
    If you go at it this way, just make sure to deal with the special conditions like going over to new year and invalid dates ( 2007-12-31 -> 2007-14-31 -> 2008-02-28/29). It's fairly simple though....
    See more | Go to post

    Leave a comment:


  • Botondus
    replied to Date calculation in php
    in PHP
    I'm not an expert when it comes to PHP, but this is one way of doing it, issue a warning X days before the expiry date:
    [PHP]
    $expiry_date = '2007-11-23'; // example
    $timestamp = strtotime($expi ry_date);
    $warning_days = 60;
    $seconds_diff = $warning_days * 24 * 3600; // taking 60 (days) * 24 (hours) * 3600 (seconds)
    $warning_timest amp = $timestamp - $seconds_diff;
    $warning_date = date('Y-m-d', $warning_timest amp);...
    See more | Go to post

    Leave a comment:


  • Hmm..Unfortunat ely it seems i can't capture the mouse cursor itself too in the screenshots.
    This is approximately the "blind" area that doesn't activate the drop-down in IE when you put the mouse cursor over it:

    This is how the menu looks like in Firefox. Activates properly on the whole surface of the menu header:

    And the same in IE. Activates only if cursor is over the text or the small arrow, not between:...
    See more | Go to post

    Leave a comment:


  • It's not online yet so i can't give you a link. I included the template code for the filter drop-down and the CSS, what else should i add?
    I could make some screenshots of the drop-down in IE/FF to show it's exact behaviour and include the javascript code related to it or tell me if you need something else. Although i doubt javascript would be at fault, since i tried pure CSS drop-down too, with JS addition for IE but it showed the exact same...
    See more | Go to post

    Leave a comment:


  • Drop down menu trouble in IE. Probably CSS is at fault

    Ok so i have a a couple drop down menus, that are used as filters. I mean to select filters for a listing of products.
    They work perfectly in Firefox, however in IE the drop down doesn't activate every time it should. If you check the code fragment from my template below, the bold part is the text on one of the filters and a small arrow image. In IE if you put the mouse cursor between the text and the arrow the drop-down doesn't trigger, which...
    See more | Go to post
No activity results to display
Show More
Working...