Select all

Select all

Alexandr45Alexandr45 Posts: 30Questions: 1Answers: 3

How can I select all records in the select field? What should I write in php?

Replies

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    Do you mean select all with the Select extension? If so, two options:

    1. Use the selectAll button
    2. Use the rows().select() method.

    Allan

  • Alexandr45Alexandr45 Posts: 30Questions: 1Answers: 3

    <select>
    <option>1</option>
    <option>2</option>
    <option>ALL</option>
    </select>
    Select all from mysql. How to implement this on the server side?

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    I'm afraid I don't actually understand what you are looking for here. Are you trying to perform a filter on the page, or something else? Could you link to a page showing the issue please?

    Allan

  • Alexandr45Alexandr45 Posts: 30Questions: 1Answers: 3

    Unfortunately, the page is located on the local server. I will try to explain it by example.
    <select>
    <option> RED </ option>
    <option> GREEN </ option>
    <option> BLACK </ option>
    <option> ALL COLORS</ option>
    </ select>
    The change event sends a request to the server, where the selection is made from the database by condition: ->where ('color', 'RED'). I need to select all the colors from the database.

  • Alexandr45Alexandr45 Posts: 30Questions: 1Answers: 3

    Allan. Thanks. The problem is solved using WHERE LIKE.

  • allanallan Posts: 63,210Questions: 1Answers: 10,415 Site admin

    Super - thanks for posting back and good to hear you've got it working now.

    Allan

This discussion has been closed.