Page 1 of 1

a little help please

Posted: Sun Sep 19, 2004 12:29 pm
by AndrewBacca
Hi,
sry twice I guess 1. if this is in the wrong place wasnt sure wot it comes under! and 2. if its been asked already I've tried different searchs and not found anything.

anyway...

I have a table in a MySQL database that has a list of product types
and i want to display say A to M in one place and N to Z in another place

the table has Id and name

example records : 1 | Bags

what is the SELECT statement for this?

Cheers
Andrew :D

Posted: Sun Sep 19, 2004 12:33 pm
by feyd
generally, it'd be a standard select, like any other.. you can either save off (into php) the results, or "print" them up to the N's and continue on in the latter area..

Posted: Sun Sep 19, 2004 12:34 pm
by AndrewBacca
umm yeah sorry my fault i didnt explain propa

I know how to use PHP with MySQL but

I aint sure how to ONLY select names from the database that start with A to M

Code: Select all

SELECT * FROM `s_product_types` WHERE 'name' = ???????????

Posted: Sun Sep 19, 2004 12:37 pm
by feyd
depending on how portable you want/need it, you can use a REGEXP or stack up all the LIKE forms...

you should backtick name, not single quote.