Query Where Begins With...

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Query Where Begins With...

Post by AliasBDI »

I have a small dictionary type database where I need a page that lists the words according to their first letter. So when someone clicks on the letter "B" it queries the database for records that begin with "b". What would this query look like?
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

Code: Select all

SELECT * FROM words WHERE word LIKE 'A%';
AliasBDI
Forum Contributor
Posts: 286
Joined: Fri Nov 15, 2002 10:35 am
Location: Spring, TX, USA

Post by AliasBDI »

worked great, thanks!
Post Reply