Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to search for a strings

Status
Not open for further replies.

murushanmugham

IS-IT--Management
Jan 2, 2003
33
Hello

I have a table with a field name as course and another as subject

the field contains data like this

Record 1
Course='M.D.-PHARMACY'
Subject='APPLIED SCIENCES'

Record 2
Course='M.S.-GENERAL SURGERY'
Subject='APPLIED BASIC SCIENCE'

I use the following

select * from tablename where fname='".$xcourse."' and subject='".$xsub."' order by year desc;


Where I have a course with two words ie. 'M.S.-GENERAL SURGERY' , no records are selected.

Whereas for course ='M.D.-PHARMACY' works fine.

How do I solve this please help



 
It wworks fine in mysql but when used in a script does not work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top