How can I make a database with querry...

User 2920414 Photo


Registered User
1 post

Could you please elaborate on your example with dropdowns. I am trying to allow a user to search my database for a list of parts. Let's say it is has 4 elements: PartNumber, Description, Manufacturer, Price. In some cases there may be just one line to display in the list. In other cases there might be 50 lines. I can do the php and in a 1900px screen, using a 4 column CSS Grid based layouts I can display a large number of lines. However if I then display the same on a <600 screen instead of the data being presented side by side it becomes sequential: All the part numbers, then the Descriptions, etc. My php (after the log in and sql connect) is while($row = mysqli_fetch_assoc($result)){
$rowing= $row['Part_Number'];
echo $rowing;
echo nl2br("\n");
}
Repeat same for the other 3 columns, each in its own html element. Am I barking up the wrong tree or could this work, please?
User 187934 Photo


Senior Advisor
20,188 posts
Online Now

Hi Angus,
Let me see why my example isn't working anymore. I may need to update the form as I'm now on php Ver. 8.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 187934 Photo


Senior Advisor
20,188 posts
Online Now


Form is now working correctly.
https://ericrohloff.com/coffeecup/ccfor … _data.html
Here's the dropdowns that are being populated by the form.
https://ericrohloff.com/coffeecup/ccfor … isplay.php
This uses a simple HTML Table but we can convert to div and css with SD.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.