By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 915 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

php code for searching data alphabetically from MySQL database

bethifUL13
P: 6
Hi, I am currently developing a website for our school project that is connected to the mySQL database. I am now creating a search page that will display the title of research papers stored in the database.
When I click the letter 'A', it should display all the titles starting in letter 'A' that is stored in the database. What is the right code for that? thanks in advance.
:D
Jan 9 '12 #1
Share this Question
Share on Google+
6 Replies


Rabbit
Expert Mod 10K+
P: 12,347
You can use the LIKE operator with the appropriate WILDCARD in your SQL.
Jan 9 '12 #2

bethifUL13
P: 6
thanks .. i'll try it
Jan 10 '12 #3

bethifUL13
P: 6
can you give sample code for that? tnx :)
Jan 11 '12 #4

P: 2
give me some sample of program
Jan 11 '12 #5

P: 2
can you give an sample about library borrowing system using MSAccess
Jan 11 '12 #6

Rabbit
Expert Mod 10K+
P: 12,347
Expand|Select|Wrap|Line Numbers
  1. SELECT *
  2. FROM someTable
  3. WHERE someField LIKE 'The%'
Jan 11 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.