Jump to content

toivo

Members
  • Posts

    36
  • Joined

  • Last visited

Posts posted by toivo

  1. It is not clear which variables in your sample are columns in your table 'data'.  You need to have variables, too.

     

    I would use something like this, after setting the variables with values to be searched, depending on the format of the date:

     

    $username = 'whatever';
    $partial_date = substr($date, 0, 7);
    $q = "SELECT * FROM `data` ";
    $q .= "WHERE uname = '" .$username . "' AND tdate LIKE '". $partial_date . "%' ";
    $q .= "ORDER BY id";
    

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.