• Hello Roland!
    I have this code snippet in custom pdb-single-tabs template:
    `<?php
    $guestLastName = $this->participant_values[‘last_name’];
    $guestName = $this->participant_values[‘first_name’];
    $guestDob = $this->participant_values[‘date_of_birth’];
    echo do_shortcode( ‘[pdb_list fields=”last_name,first_name, date_of_birth” filter=”last_name=’ . $guestLastName . ‘&first_name=’ . $guestName . ‘&date_of_birth=’ . $guestDob . ‘orderby=”date_of_arrival” order=”asc”]’ );
    ?>`
    This appears to be case sensitive.
    What am I doing wrong?
    Any help or suggestion would be much appreciated.

    Thanx in advance.

    • This topic was modified 4 years, 8 months ago by eljailer.
    • This topic was modified 4 years, 8 months ago by eljailer.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Roland Barker

    (@xnau)

    looks like you’re missing a double quote and space in front of the “orderby” …the shortcode won’t work as expected.

    Thread Starter eljailer

    (@eljailer)

    Actually, the shortcode works.
    This snippet is just an example, maybe I copied it wrong, sorry.
    The idea is to show the visitor’s previous visits on the pdb-single page, in form of spoiler.
    But the real problem is that this works only if the record’s name and last name are exactly the same – case sensitive.
    Is the problem in the database collation?
    The collation for those fields is utf8_croatian_ci.
    Or am I really just missing the double quotes?
    Thank you for your reply.

    Thread Starter eljailer

    (@eljailer)

    This is the actual code:

    <div class="wrap <?php echo $this->wrap_class ?> ">
     
     <input type="checkbox"  id="spoiler2" /> 
     <label for="spoiler2" >Raniji posjeti</label>
     <div class="spoiler">
    <?php
         $recidiv_prezime = $this->participant_values['prezime'];
         $recidiv_ime = $this->participant_values['ime'];
         $recidiv_dat_rod = $this->participant_values['datum_rodjenja'];
         echo do_shortcode( '[pdb_list fields="prezime,ime,datum_zaprimanja,status,datum_otpusta,napomena_otpust" filter="prezime=' . $recidiv_prezime . '&ime=' . $recidiv_ime . '&datum_rodjenja=' . $recidiv_dat_rod . '&u_ustanovi!DA" orderby="datum_zaprimanja" order="asc"]' );
    ?>
    Plugin Author Roland Barker

    (@xnau)

    If you have your plugin debugging on, you’ll see the query that is used to generate the list. It is not case-sensitive.

    It seems to be technically possible to make it case-sensitive by changing the collation, but I don’t know much about this.

    Thread Starter eljailer

    (@eljailer)

    Okay,
    thank you for your reply.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Case sensitive filtering’ is closed to new replies.