University of Colombo, Sri Lanka  
User Name:     
Password: 

Forum
How to retrieve part of data in the database using php or mysql? For example: I store "University Of Colombo" in the database in a name column.If I enter "University" that also want to retrieve.
Reply

Author: Kuhajeyan   Posted Date: 08/11/2005
Answer1:

Hi Thusha,

There wont be problem in retrieving data, if the data that you have inserted is upto correct data type and the length.

i am not quite sure what you mean by the part of data.

but i guess, you would like to retrieve "University of Colombo" even you specify "University" in query. if that so, that is to do with query formulation.

Say, it can be

SELECT * FROM MyUniTable WHERE column_name LIKE '%university%'

Have some refrence in the following how you can formulate queries lot of different specific to your needs-

http://www.w3schools.com/sql/sql_quickref.asp 
 
if this not what your are looking, post again



© 2002-2026 UOC Tamil. All Rights Reserved. Facebook