samedi 28 mars 2015

Search Problem in an SQL database

Not strictly a Mac issue but I could use some SQL experts to chime in.



I use one of my websites to run an SQL database.

The database is basically an open source SQL database (4images 1.7.7) with a custom template.



The search function usually works very well, however I ran into a snag a few days ago.

Trying to search for LG&B the search cam up with no results even though here are at least a dozen entries with that term in the database.

The problem is that the search term includes the & which one of the special characters used by SQL.



Now, I have a field in that database where I can enter any keywods for the search.

So the question: Can I enter a modified LG&B term in that keyword field that would allow the search to complete successfully?

There has to be some way to do that but searching through google for quite a while brought up nothing.

One suggestion was to place curly brackets around the term, ie {LG&B}, but that didn't work

also tried a backslash before the &, LG\&B and [LG&B}, neither one of those worked.



So - what todo?





via ehMac.ca http://ift.tt/1DaShpg

Aucun commentaire:

Enregistrer un commentaire