What I need to do is search brand names, find all the brands that start with the letters A-E and put those under a header on my webpage. Then search F-O and then P-Z and do the same thing. How would I go about querying the database to get the brands that start with A-E and so on? Ive got a products table with a brands row to help with the query.

There is a function called LEFT which can be used to grab the first letter of a field for comparison

example:

SELECT * FROM tblBrands WHERE LEFT(Brand,1) BETWEEN 'A' AND 'E'

etc...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.