title: Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row
body: <p>I'm running queries and receiving the following PHP error message: <code>Warning: mysqli::query(): (21000/1242): Subquery returns more than 1 row</code></p>
  
  <p>When I drop these queries into phpMyAdmin, I get this message: <code>#2014 - Commands out of sync; you can't run this command now</code></p>
  
  <p>PHP Version 5.5.18,
  MySql Version 5.6.21</p>
  
  <p>Bad Query</p>
  
  <pre><code>select *, 
    (select stime 
      from racetype_standards 
      where eventID = 8 and stypeID=st.id and gender = 2 and division = 1) 
      as standscore, 
    (select floor(stime / 60) 
      from racetype_standards 
      where eventID = 8 and stypeID=st.id and gender = 2 and division = 1) 
      as standminutes, 
    (select (stime % 60) 
      from racetype_standards 
      where eventID = 8 and stypeID=st.id and gender = 2 and division = 1) 
      as standseconds, 
    (select substring_index(stime, '.', -1)
      from racetype_standards 
      where eventID = 8 and stypeID=st.id and gender = 2 and division = 1) 
      as standhunds, 
    (select ecomment 
      from racetype_standards 
      where eventID = 8 and stypeID=st.id and gender = 2 and division = 1) 
      as ecomm 
    from standards_type st 
    where active = 1 
    order by displayOrder
  </code></pre>
  
  <p>Good Query</p>
  
  <pre><code>select *, 
    (select stime 
      from racetype_standards 
      where eventID = 7 and stypeID=st.id and gender = 2 and division = 1) 
      as standscore, 
    (select floor(stime / 60) 
      from racetype_standards 
      where eventID = 7 and stypeID=st.id and gender = 2 and division = 1) 
      as standminutes, 
    (select (stime % 60)
      from racetype_standards 
      where eventID = 7 and stypeID=st.id and gender = 2 and division = 1) 
      as standseconds, 
    (select substring_index(stime, '.', -1) 
      from racetype_standards
      where eventID = 7 and stypeID=st.id and gender = 2 and division = 1) 
      as standhunds, 
    (select ecomment 
      from racetype_standards 
      where eventID = 7 and stypeID=st.id and gender = 2 and division = 1) 
      as ecomm 
    from standards_type st 
    where active = 1 
    order by displayOrder
  </code></pre>