Calling records on the basis of alphabets

PHP+MySql

Page 1 of 1

2 Replies - 1539 Views - Last Post: 02 July 2006 - 11:36 PM Rate Topic: -----

#1 kaushiks  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 07-March 06

Calling records on the basis of alphabets

Posted 30 June 2006 - 11:38 PM

hi guys

i wanted to know how can we call data from database on the basis of alphabets, for example if we want to call names from database starting with letter A. What query should be written to call the particular names starting with particular alphabets.

regards,
kaushik
Is This A Good Question/Topic? 0
  • +

Replies To: Calling records on the basis of alphabets

#2 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: Calling records on the basis of alphabets

Posted 01 July 2006 - 04:34 AM

You'll want to check for a pattern, as per the demonstration of the LIKE statement:
http://www.w3schools...l/sql_where.asp

SELECT * FROM mytable WHERE name LIKE 'A%'

Was This Post Helpful? 0
  • +
  • -

#3 kaushiks  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 40
  • Joined: 07-March 06

Re: Calling records on the basis of alphabets

Posted 02 July 2006 - 11:36 PM

View PostAmadeus, on 1 Jul, 2006 - 03:26 AM, said:

You'll want to check for a pattern, as per the demonstration of the LIKE statement:
http://www.w3schools...l/sql_where.asp

SELECT * FROM mytable WHERE name LIKE 'A%'


Thanks its working, u guys are real boon for new programmmers like us
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1