1. Welcome Guest! In order to create a new topic or reply to an existing one, you must register first. It is easy and free. Click here to sign up now!.
    Dismiss Notice

compare dates

Discussion in 'General Software' started by 12Strings, May 20, 2015.

  1. 12Strings

    12Strings

    Joined:
    Dec 24, 2014
    Messages:
    2
    Operating System:
    Windows 7
    Hi, I get:

    Fatal error: Can't use function return value in write context in C:\xampp\htdocs\

    from following code: I just want to determine "dayslate".
    //---------

    $dayslate = CURDATE() = DATE(duedate);

    // $dayslate = DATE(NOW()) - DATE(duedate);
    //---------
    // QUERY ON tablename TABLE
    $query = "SELECT dayslate,
    --------------------------------
     
  2. DSTM (Dougie)

    DSTM (Dougie) Registered Members

    Joined:
    May 3, 2009
    Messages:
    8,270
    Location:
    SYDNEY AUSTRALIA
    Operating System:
    Windows 7
  3. 12Strings

    12Strings

    Joined:
    Dec 24, 2014
    Messages:
    2
    Operating System:
    Windows 7
    I appreciate the response mate but the issue is(was) not related to localhost. the solution was(is):
    $query = "SELECT acctno,.........DATEDIFF(CURDATE(), duedate) AS dayslate,.........
     
  4. DSTM (Dougie)

    DSTM (Dougie) Registered Members

    Joined:
    May 3, 2009
    Messages:
    8,270
    Location:
    SYDNEY AUSTRALIA
    Operating System:
    Windows 7
    Yes I have been watching the replies on the other site.
    Sorry I could not have been of more help.
     

Share This Page