The site prints information from the database into a pop-up menu, but if you create an id record, empty fields are formed, how to make them hide or information is entered into the database by id and empty fields, if you now create a column, for example mtl, it will be 7 id, and preferably 2 and so on DB Site

for($i=1;$i<=1000;$i++) { $sql=mysql_query("select * from `figures` where `id`='".$i."' order by `aboutObj`"); while($s=mysql_fetch_array($sql)) { echo "<option value='".$s['id']."'>".$s['aboutObj']."</option>"; } $sec=$s['id']; echo "<br>"; } 
  • one
    What does the column have to do with the record id? you probably should reconsider the structure of your database .. and it is desirable to show your requests, but it’s not clear what you want and what you do .. you probably make a selection of all fields (including empty ones) .. depending on the code in one place to add a check / change the query you need - Volodymyr
  • @Volodymyr I want there to be no empty lines on the site, it displays everything that is in the database, i.e. 7 id values, I created 3 more columns and added 1 value to them. id these 3 columns will be empty lines on top. Ps one of the requests added - Michael
  • Why is the request in a loop? and the id check is .. select * from figures` order by `aboutObj`` and why is it $ sec = $ s ['id']; ? Does nothing - Volodymyr
  • do a check if($s['mtl'] == '' && $s['objmtl'] =='' && $s['about..'] =='') continue; - Volodymyr
  • @Volodymyr I have there further this variable is transferred to another php file from it in js - Michael

0