P is for Practical | |
PerlMonks |
Wildcards, SQL and Perlby Anonymous Monk |
on Mar 13, 2004 at 18:33 UTC ( [id://336393]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
im making a program which it asks you a question and you give it an answer. How to make this work well, ive made the answers very small. example...
Q: What is the fundametal particle that protons are made of? A: Quarks Thats what my database looks like anyway (RowID, Question,Answer). Now im using Microsoft Access as my database, which isnt ideal but i have to live with it, i want to query the database so in the answer field i could say... The funcdamental particle is called a quark, Bob! And it would see the word quark, match it in the database, and find the rest of the data irrelevant (because it is!) My answercolumn is called answer, and this is one example of what i have tried... SELECT * FROM Grade_Theory WHERE *Answer* LIKE 'The funcdamental particle is called a quark, Bob!' OR SELECT * FROM Grade_Theory WHERE 'The funcdamental particle is called a quark, Bob!' LIKE *Answer* However none of this works, i get an "missing expected operator" error. I hop ei have worded the question well enough :P Thanks!
Back to
Seekers of Perl Wisdom
|
|