Note that there are some explanatory texts on larger screens.

plurals
  1. POIf MULTIPLE is enabled for <SELECT>, how is searching based on that field affected?
    primarykey
    data
    text
    <p>In my question in <a href="https://stackoverflow.com/questions/18415501/unexpected-entry-in-a-select-field-how-did-this-happen/18415599?noredirect=1#comment27053551_18415599">Unexpected entry in a &lt;select&gt; field! How did this happen?</a> , I had asked about an unexpected <code>01,05</code> entry in a field that stored values from a <code>&lt;FORM&gt;&lt;SELECT&gt;</code>. The input did not have MULTIPLE enabled and should have had the default of single select. </p> <p>Yet it allowed a user to make multiple selections. I have now realized that in my current scenario, there are several users who would need to select more than one option. So now I am faced with another question.</p> <p>What if, I were to need to query the database for values in that same field? Would multiple entries stored in the field screw up the results?</p> <p>Let us say that the <code>&lt;SELECT&gt;</code> asked the user to select between 01 and 04. My expectation would be that the field will store either 01, or 02, or 03, or 04 and I might query the table to return all rows that contained '02'. </p> <p>What if one of the users has made multiple selections - say 02 and 04. In the database there would now be an entry like 02,04 in that field. If I were to query for 02 (or 04 for that matter), would I get the 02,04 entry in the result along with the ones that contained only '02' in that column?</p> <p>What are the conditions under which I could face a select query that did not return all the rows I need?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COQuestion - also with the other question - somehow is: What's your problem to learn about that by doing some research? Open-ended asking like *"What are the conditions under which I could face a select query that did not return all the rows I need?"* is especially discouraged here on the website because this leaves it open to many answers. But as you're new you likely will accept the first working one (or you seem to see working), it's really not well working this way. You don't get good answers is want I want to say.
      singulars
    2. COWell! Starting from scratch 2 months ago, learned every line of code for HTML/PHP/MySqli by spending 2-3 hours everyday on SO, PHP.net and several others. Ditto for my two questions today. Does that count as research? I now have a live website with static and dynamic content, a mysql database with some 18 tables, user registration with hashed password, account approval, password reset, user segmentation and provisioning, etc. Most sites tell you how to do things. But none other than SO that answered specific questions/doubts when unexpected things happen - hence my questions here!
      singulars
    3. CODon't get me wrong, I mean reasearch for the concrete question. Just an example: I do programming since years (20+) and PHP programming since PHP 3. When I've got a question - well when programming ca. 5-10 more concrete questions per day - I do research on those if I program well. So the difference between starting and the level of experience probably is the amount of questions you have and research you do. And rest assured it never ends. So it's not wrong at all to ask questions, I just placed a comment giving feedback what I think you can improve with it. Asking back is one method.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload